I need to check disk name and whether the "enable write caching on the device" is enabled or not. so far I tried api method DriveInfo.GetDrives , But it doesn't have any property or methods that can return information I am looking for.
DriveInfo[] allDrives = DriveInfo.GetDrives();
foreach (DriveInfo d in allDrives)
{
Console.WriteLine("Drive {0}", d.Name);
Console.WriteLine(" Drive type: {0}", d.DriveType);
}
https://msdn.microsoft.com/en-us/library/system.io.driveinfo.getdrives(v=vs.110).aspx