适合web
string tmp = System.AppDomain.CurrentDomain.BaseDirectory;
tmp = System.Environment.CurrentDirectory;
tmp = System.AppDomain.CurrentDomain.SetupInformation.ApplicationBase;
tmp = HttpContext.Current.Request.PhysicalApplicationPath;
适合winform
string tmp = System.Environment.CurrentDirectory;
tmp = System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName;
tmp = System.IO.Directory.GetCurrentDirectory();
tmp = System.Windows.Forms.Application.StartupPath;
tmp = System.Windows.Forms.Application.ExecutablePath;