G
Guest
I have the following class :
Public Class MyTreeNode
Inherits TreeNode
Dim mystring As String
End Class
Now, when I try to do this :
''''''''''''nodes is a TreeNodeCollection, s is string
dim node as TreeNode
node = CType(nodes.Add(s), MyTreeNode)
I receive :
Unable to cast object of type 'System.Windows.Forms.TreeNode' to type
'Renee.MyTreeNode'.
???
Public Class MyTreeNode
Inherits TreeNode
Dim mystring As String
End Class
Now, when I try to do this :
''''''''''''nodes is a TreeNodeCollection, s is string
dim node as TreeNode
node = CType(nodes.Add(s), MyTreeNode)
I receive :
Unable to cast object of type 'System.Windows.Forms.TreeNode' to type
'Renee.MyTreeNode'.
???