How to show the all folder and subfolders of my system in a tree view
hi all,, i have to show the all folder and subfolders of my system in a tree view .. can anybody help me out... thnx in advance.....
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Muhammad Shahid FarooqPosted Oct 16, 2008, 10:46 AM
using
System.IO;DirectoryInfo
objDirectoryInfo; DirectoryInfo[] objDirectoryInfoArray;objDirectoryInfo =
new DirectoryInfo("C:\\Program Files");objDirectoryInfoArray = objDirectoryInfo.GetDirectories();
for (int i = 0; i < objDirectoryInfoArray.Length; i++){
treeView1.Nodes.Add(objDirectoryInfoArray[i].Name);
}