I am just decompiled the dll and now I am really confused. m_pen is created
not in all constructors!!!
I thought that if I initialize class member on the way like I did with pen,
it is declared in all constructors.
Please could somebody elaborate on this?
Public Sub New(....)
MyBase.New(..)
Return
End Sub
Public Sub New()
MyBase.New()
_m_pen = New Pen(Color.Beige)
Return
End Sub
"Boni" <oilia@nospam> schrieb im Newsbeitrag
news:%2****************@TK2MSFTNGP12.phx.gbl...
More code..
Friend Class A
Inherits B
Private m_pen As New System.Drawing.Pen(System.Drawing.Color.Beige) 'color
is dummy ! It is changed it time
Public Overrides Sub Draw()
Debug.Assert(Not Me.m_pen Is Nothing, "pen is nothing")
If Me.m_pen Is Nothing Then
Me.m_pen = New System.Drawing.Pen(System.Drawing.Color.Beige)
End If
End Sub
Public Sub New(ByVal id As intgere)
MyBase.New("aaaaa",id)
End Sub
Public Sub New()
MyBase.New()
End Sub
End Class