Declaring a nullable type in VB.net 2.0 and determining whether or not it has a value is easy:
But is there a way to set r back to the state of having no value having given it one?
Code:
Dim r As Nullable(Of Long)
MsgBox(r.HasValue) 'False
r = 0
MsgBox(r.HasValue) 'True