From MasaSam's excellent tree view sample
Why does this work -->
Public Sub New()
Me.New("My Computer")
End Sub
Public Sub New(ByVal text As String)
MyBase.New(FileSystemNodeType.Computer, Text)
Me.ImageKey = ComputerKeyValue
Me.SelectedImageKey = ComputerKeyValue
End Sub
And this does not-->
Public HisName As String = Environment.UserName + "'s Computer"
Public Sub New()
Me.New(HisName)
End Sub
Public Sub New(ByVal text As String)
MyBase.New(FileSystemNodeType.Computer, Text)
Me.ImageKey = ComputerKeyValue
Me.SelectedImageKey = ComputerKeyValue
End Sub
HisName throws this error -->Implicit reference to object under construction is not valid when calling another constructor.
Please help
Thanks
Why does this work -->
Public Sub New()
Me.New("My Computer")
End Sub
Public Sub New(ByVal text As String)
MyBase.New(FileSystemNodeType.Computer, Text)
Me.ImageKey = ComputerKeyValue
Me.SelectedImageKey = ComputerKeyValue
End Sub
And this does not-->
Public HisName As String = Environment.UserName + "'s Computer"
Public Sub New()
Me.New(HisName)
End Sub
Public Sub New(ByVal text As String)
MyBase.New(FileSystemNodeType.Computer, Text)
Me.ImageKey = ComputerKeyValue
Me.SelectedImageKey = ComputerKeyValue
End Sub
HisName throws this error -->Implicit reference to object under construction is not valid when calling another constructor.
Please help
Thanks