Skip to main content

Posts

Showing posts from September, 2017

C# Drive Info

foreach (DriveInfo DI in DriveInfo.GetDrives()) Console.WriteLine( ( DI.IsReady ? (DI.VolumeLabel.Length == 0 ? "Drive Type: " + DI.DriveType.ToString() : "Volume Label: " + DI.VolumeLabel) : "Not Ready : " + DI.DriveType.ToString() ) + // " (" + DI.Name.Replace("\\", "") + ")" " (" + DI.Name + ")" + Environment.NewLine ); Code highlighting compliments of http://markup.su/highlighter/ Another options is  http://hilite.me/