Share via


How to: Add Nodes to a TreeView Control

This example adds three first-level nodes to an existing TreeView control.

Example

treeView1.Nodes.Add("First Node");
treeView1.Nodes.Add("Second Node");
treeView1.Nodes.Add("Third Node");

Compiling the Code

This example requires:

See Also

Concepts

Designing a User Interface in Visual C#

Other Resources

TreeView Controls

Visual C# Guided Tour