I'm trying to pass "Nothing" to a parameter in Vb.NET ( using VS 2010 with everything to default )
The code is like this:
Public Property status As statusEvidenta
<DebuggerNonUserCode()> _
Get
Me.m_status = Nothing
Me.m_status = MyForms.Create__Instance__(Of statusEvidenta)(Nothing)
where :
Public m_status As statusEvidenta
and :
Private Shared Function Create__Instance__(Of T As {System.Windows.Forms.Form, New})(ByRef Instance As T) As T
Dim v_genericMethodVar As T
If ((Not Instance Is Nothing) AndAlso Not Instance.IsDisposed) Then
Return Instance
End If
I'm not familiar with VB.NET but why can't I just pass a Nothing parameter ? In c++ you can pass a NULL , is this not possible here ?
I get the following errors:
Additional information: Object reference not set to an instance of an object.