DriveInfoExtensionsGetDriveLetter Method
Gets the drive letter of the source DriveInfo.
Namespace: DevCase.Extensions.DriveInfoExtensionsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[EditorBrowsableAttribute(EditorBrowsableState.Always)]
public static char GetDriveLetter(
this DriveInfo sender
)
<ExtensionAttribute>
<EditorBrowsableAttribute(EditorBrowsableState.Always)>
Public Shared Function GetDriveLetter (
sender As DriveInfo
) As Char
Dim sender As DriveInfo
Dim returnValue As Char
returnValue = sender.GetDriveLetter()
public:
[ExtensionAttribute]
[EditorBrowsableAttribute(EditorBrowsableState::Always)]
static wchar_t GetDriveLetter(
DriveInfo^ sender
)
[<ExtensionAttribute>]
[<EditorBrowsableAttribute(EditorBrowsableState.Always)>]
static member GetDriveLetter :
sender : DriveInfo -> char
No code example is currently available or this language may not be supported.
- sender DriveInfo
-
The source DriveInfo.
Char
The resulting drive letter.
In Visual Basic and C#, you can call this method as an instance method on any object of type
DriveInfo. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
This is a code example.
No code example is currently available or this language may not be supported.
Dim dInfo As DriveInfo = DriveInfo.GetDrives()(0)
Dim dLetter As Char = GetDriveLetter(dInfo)
Console.WriteLine(dLetter)
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.