Export (0) Print
Expand All

DriveInfo.Name Property

Gets the name of a drive, such as C:\.

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

member Name : string with get

Property Value

Type: System.String
The name of the drive.

This property is the name assigned to the drive, such as C:\ or E:\.

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

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

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft