1
Answer

Adding child to parent

Vipul Kelkar

Vipul Kelkar

15y
2.3k
1

Hi guys...

I have created a root node in a function and i want to pass it to another fuction

void CreateRoot()

{

      //created a root node named 'root' here and passed it to a function named CreateChild(root);

}

void CreateChild(TreeNode root)

{

//here i need to create a child node to root...m not able to do it

// not able to add       root.Nodes.Add(//child);

//not able to see root.'Nodes' here

 

}

 

Please help me..its urgent

Answers (1)
Next Recommended Forum