string path = "";
if (System.Environment.CurrentDirectory == AppDomain.CurrentDomain.BaseDirectory)
{
path = AppDomain.CurrentDomain.BaseDirectory;
}
else
{
path = AppDomain.CurrentDomain.BaseDirectory;
}