Consider the following:
Public Module Extensions
<Extension()> _
Public Sub Initialize(ByRef Target as SomeClass, ByVal SomeParam as Something )
...
Target = SomethingElse
end Sub
End Module
Class SomeClass
...
sub New(ByVal SomeParam as Something )
Me.Initialize(SomeParam)
end sub
sub New()
end sub
End Class
'Case 1: Doesnt Work...why????:
Dim foo as new SomeClass(SomeParam) 'foo remains uninitialized
'Case 2: Does Work:
Dim foo as new SomeClass()
foo.Initialize(SomeParam) 'foo is initialized
Question: Why is Case 1 failing to initialize the object as expected?