A
AP
Why do I get a conversion error with this line of code? (Type of conditional
expression can't be determined because there is no implicit conversion
between 'int' and 'System.DBNull')
object o = (1+2 ==3) ? 3 : DBNull.Value;
when
object o;
if (1+2==3) {
o = 3;
else {
o = DBNull.Value;
}
works...shouldn't they be doing the same thing??
expression can't be determined because there is no implicit conversion
between 'int' and 'System.DBNull')
object o = (1+2 ==3) ? 3 : DBNull.Value;
when
object o;
if (1+2==3) {
o = 3;
else {
o = DBNull.Value;
}
works...shouldn't they be doing the same thing??