Returns an array of string containing the names of the logical drives on the current computer.
An array of string where each element contains the name of a logical drive.
The following example shows how to display the logical drives of the current computer using the GetLogicalDrives method.
CopyVB.NET
CopyC#
' 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 '
// 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*/