I tried to migrate a library targeted at .NET Framework 4.6.2 to 4.7.2.
When testing the code, I got a Class Exists exception in my WndProc override sub. It looks like there may have been a change in the way constructors are processed. Here is the scenario on which my question is based…
Public Sub New (arg1 as string) Me.New(arg1, arg2_DefaultValue) End Sub Public Sub New(arg1 as String, arg2 as Integer) MyBase.New <some processing> End Sub
With 4.7.2, does the class get created when the first New is called or is there some other reason I need to find for the Class Exists exception when running the code with 4.7.2?
Many thanks for any help or advice.
Here is my WndProc code in case it is relevant…
Protected Overrides Sub WndProc(ByRef m As Message) Const WM_NCLBUTTONDOWN As Integer = &HA1 Const WM_NCLBUTTONUP As Integer = &HA2 Const HTCLOSE As Integer = 20 Select Case m.Msg Case WM_NCLBUTTONDOWN If CInt(m.WParam) = HTCLOSE Then Return End If Case WM_NCLBUTTONUP If CInt(m.WParam) = HTCLOSE Then MsClose.PerformClick() Return End If End Select MyBase.WndProc(m) ' Exception thrown here End Sub