May be this will help instead of writing the path all the time:
private void showHelp()
{
string dirpath = string.Empty;
dirpath = System.Environment.CurrentDirectory;
string[] files = new string[100];
do
{
if (dirpath == string.Empty || dirpath == Directory.GetDirectoryRoot(dirpath))
{
MessageBox.Show("no helpfile found");
}
else
{
files = Directory.GetDirectories(dirpath, "ACH");
if (files.Length > 0)
{
string strHlp = string.Empty;
strHlp = files[0] + "\\ACHWINAPP.chm";
Help.ShowHelp(this, strHlp);
break;
}
else
{
dirpath = Directory.GetParent(dirpath).ToString();
}
}
} while (true);
}
I am working as a Software engineer. Web development in Asp.Net with C#, WinForms and MS sql server are the experience tools that I have had for the past 3 years. Yet to work on WCF, WPF, Silverlight and other latest ones.