In The Hand LtdIn The Hand
GetLogicalDrives Method
NamespacesInTheHandEnvironmentHelperGetLogicalDrives()()()()
.NET Components for Mobility
Returns an array of string containing the names of the logical drives on the current computer.
Declaration Syntax
C#Visual Basic
public static string[] GetLogicalDrives()
Public Shared Function GetLogicalDrives As String()
Return Value
An array of string where each element contains the name of a logical drive.
Examples
The following example shows how to display the logical drives of the current computer using the GetLogicalDrives method.
CopyVB.NET
' Sample for the EnvironmentHelper.GetLogicalDrives method
Imports System
Imports InTheHand

Class Sample
    Public Shared Sub Main()
        System.Diagnostics.Debug.WriteLine()
        Dim drives As [String]() = EnvironmentHelper.GetLogicalDrives()
        System.Diagnostics.Debug.WriteLine("GetLogicalDrives: {0}", [String].Join(", ", drives))
    End Sub 'Main
End Class 'Sample
'
'This example produces the following results:
'
'GetLogicalDrives: \, Storage Card
'
CopyC#
// Sample for the EnvironmentHelper.GetLogicalDrives method
using System;
using InTheHand;

class Sample 
{
    public static void Main() 
    {
        System.Diagnostics.Debug.WriteLine();
        String[] drives = EnvironmentHelper.GetLogicalDrives();
        System.Diagnostics.Debug.WriteLine("GetLogicalDrives: {0}", String.Join(", ", drives));
    }
}
/*
This example produces the following results:

GetLogicalDrives: \, Storage Card*/

Assembly: InTheHand (Module: InTheHand) Version: 7.0.0.0