String[] dirs = System.IO.Directory.GetDirectories(@"D:\test\Blocks"); int i; for (i = 0; i < dirs.Length; i++) { listBox1.Items.Add(Path.GetFileName(dirs[i])); } String[] files = System.IO.Directory.GetFiles(@"D:\test\Blocks"); for (i = 0; i < files.Length; i++) { listBox1.Items.Add(Path.GetFileName(files[i])); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)