更新时间:2022-10-23 20:48:52
System.Diagnostics.Process.GetCurrentProcess()。MainModule.FileName
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