How to assign null value to value type variable in C#

Waqas Anwar
09 June 2009
5287 Views

If you have a value type variable in your program and you want to assign a null value to it you cannot do this without making that variable nullable as following code shows:

int? i = null;