Dinesh Santhalingam

Dinesh Santhalingam

  • NA
  • 737
  • 367.3k

Select a folder using OpenFileDialog folder

Oct 4 2017 1:47 AM
I need to select the folder by using the OpenFiledialog option .I tried something in my below code.But i cant able to select the folder using that Code. please help me to solve this issue.
  1. ofd = new System.Windows.Forms.OpenFileDialog();  
  2.   
  3.             ofd.Filter = "Folders|\n";  
  4.             ofd.AddExtension = false;  
  5.             ofd.CheckFileExists = false;  
  6.             ofd.DereferenceLinks = true;  
  7.             ofd.Multiselect = false;  
  8.             ofd.ShowDialog();  
Please help me to solve this.
 
Thanks Regards,
Dinesh 

Answers (6)