Get the application root path in Win Application in C#.net

Hi friends

Here is the code to find the root path of the window application through this code.
before using this code you should use the System.IO namespace .

string sPath= System.IO.Directory.GetParent(System.Windows.Forms.Application.ExecutablePath).Parent.Parent.FullName + "\\pic\\" + openFileDialog1.SafeFileName.ToString(); 

Regards,
Rajesh

0 comments: