DriveInfo.DriveType Property

 

Gets the drive type, such as CD-ROM, removable, network, or fixed.

Namespace:   System.IO
Assembly:  mscorlib (in mscorlib.dll)

member DriveType : DriveType with get

Property Value

Type: System.IO.DriveType

One of the enumeration values that specifies a drive type.

The DriveType property indicates whether a drive is one of the following: CDRom, Fixed, Network, NoRootDirectory, Ram, Removable, or Unknown. These values are described in the DriveType enumeration.

The following code example demonstrates the use of the DriveInfo class to display information about all the drives on the current system.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 2.0
Return to top
Show: