Click to See Complete Forum and Search --> : Enviroment


dave1979bell
September 29th, 2005, 10:46 AM
I am trying to get the logical drives from the pc my app is run on, i tried this but it does not work what am i doing wrong?



string[] strArray = new string[5] { Environment.GetLogicalDrives };

thanks in advance

Dave

cilu
September 29th, 2005, 10:58 AM
GetLogicalDrives is a static method not a property, so you must use ().

Try this:

String[] drives = Environment.GetLogicalDrives();

dave1979bell
September 30th, 2005, 03:15 AM
thanks