I'm new in C#. In c# I can't set value of a structure to null how can I create a structure with null value support?
Structs and value types can be made nullable by using the Generic Nullable<> class to wrap it. For instance:
Nullable<int> num1 = null;
C# provides a language feature for this by adding a question mark after the type:
int? num1 = null;
Same should work for any value type including structs.
MSDN Explanation: Nullable Types (c#)