How to set value type as null

Madhu.b.rokkam
Posted by Madhu.b.rokkam under C# category on | Points: 40 | Views : 2438
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;

or

Nullable<int> num = null;

Comments or Responses

Login to post response