DriveInfo.Name Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

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
Available since 2.0
Return to top
Show: