How to assign null value to value type variable in VB.NET

Waqas Anwar
09 June 2009

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:

Dim i As Nullable(Of Integer) = Nothing