How to set value type as null

Posted by Madhu.b.rokkam under C# category on | Points: 40 | Views : 1824
When we try to declare a value type as null we usually get build error. But if you really need to do that then we can do that as below

int? n = null;


Nullable<int> num = null;

Comments or Responses

Login to post response