Possible Duplicate:
Conditional operator assignment with Nullable<value> types?
in the following code snippet company.ParentID is a int? and parrent a reference type.
this code is a syntax error.
is there anyway to fix this inline conditional??
company.ParentID = (parent == null ? null: (parent.ID));
Cast parent.Id to an int?
company.ParentID = (parent == null) ? null : (int?)parent.ID;