April 2002
Intermediate to advanced
1024 pages
23h 26m
English
To demonstrate some of the classes available in the System.IO namespace, a Directory application was built in the Directory directory. By recursing through the directory structure, you can make use of the Directory, File, FileInfo, and DirectoryInfo classes. (This sample application is available in the Directory directory.) Listing B.55 shows a code snippet that initializes a tree control with drive and directory information.
private void InitializeTreeControl()
{
// Initialize TreeControl.
// Populate the TreeView with data.
// First add the root node.
rootNode = new TreeNode("My Computer", (int)ImageListTypes.Computer, (int)ImageListTypes
.Computer); ... |
Read now
Unlock full access