I am trying to upgrade a VB6 dll to VB.NET and I am brand new to VB.NET.
I used the conversion tool and the dll compiles, but I get {"Object reference not set to an instance of an object."} errors in variables that I have defined in a module.
Here is my simplified code.
In module:
Public VersionMe As New VersionNumber
Classes:
Public Class VersionNumber
Public ReadOnly Property ValidityCheck () As boolean
Get
ValidityCheck = true
End Get
End Property
End Class
Public Class WinReg
Public Sub New()
MyBase.New()
Class_Initialize_Renamed()
End Sub
Private Sub Class_Initialize_Renamed()
If Not VersionMe.ValidityCheck Then <-- error here
MsgBox("Invalid Installation")
Exit Sub
End If
End Sub
End Class
When I try to instantiate a WinReg object, I get the error where I have indicated.
Thanks in advance.
I used the conversion tool and the dll compiles, but I get {"Object reference not set to an instance of an object."} errors in variables that I have defined in a module.
Here is my simplified code.
In module:
Public VersionMe As New VersionNumber
Classes:
Public Class VersionNumber
Public ReadOnly Property ValidityCheck () As boolean
Get
ValidityCheck = true
End Get
End Property
End Class
Public Class WinReg
Public Sub New()
MyBase.New()
Class_Initialize_Renamed()
End Sub
Private Sub Class_Initialize_Renamed()
If Not VersionMe.ValidityCheck Then <-- error here
MsgBox("Invalid Installation")
Exit Sub
End If
End Sub
End Class
When I try to instantiate a WinReg object, I get the error where I have indicated.
Thanks in advance.