The following code will demonstrate how to retrive the Number of Drives in a Particular Computer. You can also get lots of more information of the Drives like Total Space and Available space.
Please Remember to add refference to
System.IO namespace.
DriveInfo[] driv = DriveInfo.GetDrives();
foreach (DriveInfo d in driv)
{
Console.WriteLine("Drive Name :"+ d.Name);
Console.WriteLine("Drive Format :"+ d.DriveFormat);
}
Regards
Hefin Dsouza