Header Ads

Header Ads

friends today i tell you how to get hard drive space using csharp

first we use using system.io namespace
then we use fileinfo class and driveinfo class
coding
....................
using system.io
public static void Main()
{
fileinfo fs=new fileinfo("c:");
driveinfo ds=new driveinfo(fs.fullname);
Console.Write("drive");
Console.WriteLine(ds.name)
if(ds.IsReady)
{
Console.
}

}

No comments:

Powered by Blogger.