Hello everyone,
My disk space has been getting low recently and so I decided to write a program to list files/folders above 300 megs in a listbox. Unfortunately, I have no idea what kind of controls I'd want to use in C# and I don't want to use VB as I'm trying to learn C#, so this should be a good project.
Any ideas

Suggestions on what to do?
evilone
private void cmdStart_Click(object sender, EventArgs e)
{
Directory[] objArrDirs = Directory.GetDirectories("C:\\");
foreach(Directory objDir in objArrDirs)
{
MessageBox.Show(objDir);
}
}
That is what I'm doing. It errors saying something about not being able to convert from string to static or something like that. Any ideas
Thomas Ott
About VB.NET. Never used it. I used VB6 =\. I'm thinking about getting .NET, but I'd really like to move on to more C-based languages. VB honestly isn't a great choice for the kind of things I want to program (games and cpu-eating applications).
Thanks again for your help. More suggestions are openly welcomed =D
EDIT: There seems to be no "Directory" under System.IO.
Second Edit: I found it, I was trying to use Sytem.IO.Directory when I just needed to do System.IO. Sorry.
Bliszek
Cathal
DanielRehn
kismath
Not trying to prove you wrong, just explaining my logic.
Change2
Vishal Bansod
Directory.GetDirectories returns a string array, not an array of Directory objects. Directory is a static class, you are better off using the non-static DirectoryInfo
DirectoryInfo rootDir = new DirectoryInfo("c:\\");
DirectoryInfo[] subDirs = rootDir.GetDirectories();
foreach
(DirectoryInfo objDir in subDirs){
MessageBox.Show(objDir.FullName);
}
Kylin.Sandfield