Drive List - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Drive List

jjerryjjerry Posts: 4Member
Hi,

I need to obtain a list of all drives installed in the computer (including network drives) without using Windows API functions?
Is there a class in the .NET framework that holds the solution
to this?

Thanks!!

Comments

  • iwilld0itiwilld0it Posts: 1,134Member
    : Hi,
    :
    : I need to obtain a list of all drives installed in the computer (including network drives) without using Windows API functions?
    : Is there a class in the .NET framework that holds the solution
    : to this?
    :
    : Thanks!!
    :

    Here is how you loop through all the drives ...

    [code]
    foreach(String drv in Environment.GetLogicalDrives())
    {
    MessageBox.Show(drv);
    }
    [/code]
Sign In or Register to comment.