由网友(那疼、说不出)分享简介:可能重复: How做我得到当前的可执行文件在C#中的名字? 这是可执行文件加载外部库。有没有一种方法让库知道调用可执行文件? (我发誓我看到了这个问题的答案在其他地方,但我似乎无法找到它了)解决方案 System.Diagnostics.Process.GetCurrentProcess()。MainModu...![R 软件安装](https://p.xsw88.cn/allimgs/daicuo/20230902/801.png)
可能重复: How做我得到当前的可执行文件在C#中的名字?
这是可执行文件加载外部库。 有没有一种方法让库知道调用可执行文件?
(我发誓我看到了这个问题的答案在其他地方,但我似乎无法找到它了)
解决方案 System.Diagnostics.Process.GetCurrentProcess()。MainModule.FileName
![R 软件安装](https://p.xsw88.cn/allimgs/daicuo/20230902/801.png)
Possible Duplicate: How do I get the name of the current executable in C#?
An executable file loads an external library. Is there a way for the library to know the calling executable file?
(I would have sworn I saw the answer to this elsewhere, but I can't seem to find it anymore)
解决方案System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName
相关推荐
最新文章