Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

BUG denotes a property

Avatar of Rahamathulla_J
Rahamathulla_J asked on
2 Comments1 Solution244 ViewsLast Modified:
private  void AddNode(XmlNode inXmlNode,TreeNode inTreeNode)
                  XmlNode xNode;
                  TreeNode tNode;
                  XmlNodeList nodeList;
                  long i;
                  // Loop through the XML nodes until the leaf is reached.
                  // Add the nodes to the TreeView during the looping process.
                  if (inXmlNode.HasChildNodes)
                        nodeList = inXmlNode.ChildNodes;
                        for(i = 0;i<nodeList.Count-1;i++)
                                    xNode = inXmlNode.ChildNodes(i); //Bug line
                                    inTreeNode.Nodes.Add(new TreeNode(xNode.Name));
                                    tNode = inTreeNode.Nodes(i);
                                    AddNode(xNode, tNode);
                  // Here you need to pull the data from the XmlNode based on the
                  // type of node, whether attribute values are required, and so forth.
                  inTreeNode.Text =inXmlNode.OuterXml;

I have convert the above code from vb.net to c# but it is showing the bug "denotes a property where a method was expected" in the following 2 lines

xNode = inXmlNode.ChildNodes(i);
tNode = inTreeNode.Nodes(i);
Avatar of AlexFM

Our community of experts have been thoroughly vetted for their expertise and industry experience.

This problem has been solved!
Unlock 1 Answer and 2 Comments.
See Answers