TreeNode can't find .ChildNodes

A

Alien Attack

Using .NET 2.0 I'm trying to traverse a treeview by using the following

// Some other code
// node is a System.Windows.Form.TreeNode
node.ChildNodes.Count

However, I keep getting the following error

System.Windows.Form.TreeNode does not contain a definition for 'ChildNodes'.

No one else seems to have a problem finding this method, where is it?
 
M

Mattias Sjögren

No one else seems to have a problem finding this method, where is it?

The property is simply called Nodes, not ChildNodes.


Mattias
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top