M
mihkeltt
Just one question, why wouldn't the following lines compile:
decimal? decVar = 5;
int? intVar = decVar == null ? null :
Convert.ToInt32(decVar.GetValueOrDefault());
The compiler shows the following message: "There is no implicit conversion
between 'null' and 'int'."
A similar if-else construction works just fine.
Mihkel
decimal? decVar = 5;
int? intVar = decVar == null ? null :
Convert.ToInt32(decVar.GetValueOrDefault());
The compiler shows the following message: "There is no implicit conversion
between 'null' and 'int'."
A similar if-else construction works just fine.
Mihkel