C# DriveInfo IsReady
Description
DriveInfo IsReady
Gets a value that indicates whether
a drive is ready.
Syntax
DriveInfo.IsReady
has the following syntax.
public bool IsReady { get; }
Example
Gets a value that indicates whether a drive is ready.
using System;/*from w w w . j ava2s. co m*/
using System.IO;
class Test
{
public static void Main()
{
DriveInfo[] allDrives = DriveInfo.GetDrives();
foreach (DriveInfo d in allDrives)
{
Console.WriteLine( d.IsReady);
}
}
}
The code above generates the following result.