- string path1 = System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName;
- string path2 = System.Environment.CurrentDirectory;
- string path3 = System.IO.Directory.GetCurrentDirectory();
- string path4 = System.AppDomain.CurrentDomain.BaseDirectory;
- string path5 = System.AppDomain.CurrentDomain.SetupInformation.ApplicationBase;
- string path6 = System.Windows.Forms.Application.StartupPath;
- string path7 = System.Windows.Forms.Application.ExecutablePath;
-
- StringBuilder str=new StringBuilder();
- str.AppendLine("System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName:" + path1);
- str.AppendLine("System.Environment.CurrentDirectory:" + path2);
- str.AppendLine("System.IO.Directory.GetCurrentDirectory():" + path3);
- str.AppendLine("System.AppDomain.CurrentDomain.BaseDirectory:" + path4);
- str.AppendLine("System.AppDomain.CurrentDomain.SetupInformation.ApplicationBase:" + path5);
- str.AppendLine("System.Windows.Forms.Application.StartupPath:" + path6);
- str.AppendLine("System.Windows.Forms.Application.ExecutablePath:" + path7);
- string allPath = str.ToString();
-
posted @
2017-04-24 15:28
SugarWater
阅读(
219)
评论()
编辑
收藏
举报