How to get list of drives in C# – C# Programming Example
General

How to get list of drives in C#

In this example I will show you how to use GetLogicalDrives method of returns all logical drives on a system.

To do this, create a new Project and write the following code. The following example shows how to display the logical drives of the current computer using the GetLogicalDrives method.

Output:

 

 

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: