Possible duplicate:
Zero types and ternary operator: why? 10: null` is forbidden?
Why is this not working? Looks like a valid code.
string cert = ddCovCert.SelectedValue; int? x = (string.IsNullOrEmpty(cert)) ? null: int.Parse(cert); Display(x);
How do I encode this? The method is Nullable. If a row is selected in the drop-down list, I need to parse this into int, otherwise I want to pass null to the method.
string null c # nullable
Hcabnettek Aug 14 '09 at 17:16 2009-08-14 17:16
source share