Possible Duplicate:
The type of the conditional expression can not be determined?
I currently wrote this statement:
byte? Col_8 = (Rad_8.SelectedValue == null) ? null : byte.Parse(Rad_8.SelectedValue);
but it has this Error:
Type of conditional expression cannot be determined because there is no implicit conversion between
'<null>'and'byte'
why I can use null after ? ? what if equivalent of above code without if statement?
The compiler cannot infer the type of the conditional statement because
nullhas no type and it does not consider the expected return value.Use