Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

Getting free space on Hard Drive

$
0
0
Okay, so I'm creating an application.
The point of the application is to get the free space on a specified hard drive (The user types the letter) and it's represented with a graph of some kind.

What I'm stuck with is trying to determine if the hard drive is valid or not.
For example, somebody could type "e", but that isn't a hard drive, so they get a warning.

Here is what I'm using to find hard drive.

            string letter;
            letter = Console.ReadLine();

            ManagementObject disk = new ManagementObject("win32_logicaldisk.deviceid=\"" + letter + ":\"");



So I'm just looking for some sort of validation.

Tah (:

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>