P
pei_world
I wrote a class inherit from TreeNode of the system as follow, but when I
try to use it with TreeView object, then it doesn't work, can anyone help?
//============== code to use the inherited node
ServiceServer.InheritTreeNode rootNode = null;
rootNode = treeServices.Nodes.Add(System.Net.Dns.GetHostName());
//*** Error: Cannot implicitly convert type 'System.Windows.Forms.TreeNode'
to 'ServiceServer.InheritTreeNode'
//============== inherit class
public class InheritTreeNode:TreeNode
{
public enum NodeType
{
root,
subroot,
content
}
private NodeType nodetype;
......
......
try to use it with TreeView object, then it doesn't work, can anyone help?
//============== code to use the inherited node
ServiceServer.InheritTreeNode rootNode = null;
rootNode = treeServices.Nodes.Add(System.Net.Dns.GetHostName());
//*** Error: Cannot implicitly convert type 'System.Windows.Forms.TreeNode'
to 'ServiceServer.InheritTreeNode'
//============== inherit class
public class InheritTreeNode:TreeNode
{
public enum NodeType
{
root,
subroot,
content
}
private NodeType nodetype;
......
......