Sumit Kumawat

Sumit Kumawat

  • NA
  • 454
  • 413.6k

Windows explorer using WPF Application

Feb 27 2012 1:32 AM
 public static IList<DirectoryInfo> GetRootDirectories()
        {
           
            return (from x in Directory.GetLogicalDrives()
                    select new DirectoryInfo(x)).ToList();
         }


  public static IList<DriveInfo> GetRootDirectories()
        {
            return (from x in DriveInfo.GetDrives() select x).ToList();
             
   
           // return null;
        }

By using one of the code above i am able to acces all drives but i want to acces only C drive result like "Desktop", "Documents", "Picture", "Music", "Videos", "Downloads", "Recent","Network" plz help


Answers (1)