How would I achieve setting an instance of one of my classes to Nothing if the constructor fails?
Code:Public Class MyClass Public Sub New( Parm As Integer ) If Parm < 1 Then 'make the instance Nothing End Sub End Class
In the calling code doing Dim obj As New MyClass( 0 ) should leave obj set to Nothing.




Reply With Quote