How to Make Structure as Null in C# ?
EMPLOYEE? objEmployee = null;
EMPLOYEE stEmployee = objEmployee.GetValueOrDefault();
but this make stEmployee fields as null,but i want to make this structure as null.
It shows stEmployee.FirstName = null,stEmployee.LastName = null
But i want to make stEmployee as null.
How to achieve that ?
You can’t. Structs are value objects in C#. If you require them to be nullable, you need to use the syntax
EMPLOYEE?