c#如何获取当前运行程序的文件名

2024-11-04 16:34:42
推荐回答(5个)
回答(1):

string strFullPath = Application.ExecutablePath;
string strFileName = System.IO.Path.GetFileName ( strFullPath );

回答(2):

那如果application.exename 或者application.exename 找到某个程序后,能不能把它的窗口激活显示呢?我很想找这个方法,这样可以防止某些自己写的程序运行两遍

回答(3):

程序运行时——任务管理器——应用程序

回答(4):

application.exename

回答(5):

application.ExecutalePath
没记错的话