David Smith

David Smith

  • NA
  • 2k
  • 0

SilverLight: DriveInfo ; Using System.IO;

Aug 13 2011 9:36 PM
I cant get access to  "DriveInfo". I added "Using System.IO;"
Do you have any clue why I cant get access to "DriveInfo"


    public long GetTotalFreeSpace(string driveName)
    {
      foreach (DriveInfo drive in DriveInfo.GetDrives())
      {
        if (drive.IsReady && drive.Name == driveName)
        {
          return label.TotalFreeSpace;
        }
      }
      return -1;
    }


Answers (9)