...
System.Environment.CurrentDirectory和System.AppDomain.CurrentDomain.BaseDirectory在Unity中有效,其他未测。 获取当前进程的完整路径,包含文件名 进程名 。 string str this.GetType .Assembly.Location result: X: xxx xxx xxx.exe .exe文件所在的目 ...
2018-09-17 16:08 0 2472 推荐指数:
...
前7种获取的都是exe所在目录,后两种获取的是dll所在目录 ...
= Environment.CurrentDirectory;//获取和设置当前目录(即该进程从中启动的目录)的完全限定路径。(备注:按照定义,如果该进程在 ...
1.//获取模块的完整路径。 string path1 = System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName; 2.//获取和设置当前目录(该进程从中启动 ...
//获取当前进程的完整路径,包含文件名(进程名)。string str = this.GetType().Assembly.Location;result: X:\xxx\xxx\xxx.exe (.exe文件所在的目录+.exe文件名)//获取新的 Process 组件并将 ...
1.//获取模块的完整路径。 string path1 = System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName; 2.//获取和设置当前目录(该进 ...
string path=Path.Combine(AppDomain.CurrentDomain.BaseDirectory); //string path = "E:/ ...