代码如下: string path = Path.GetDirectoryName(Process.GetCurrentProcess().MainModule.FileName);
或者:
string path=Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase);
代码如下: string path = Path.GetDirectoryName(Process.GetCurrentProcess().MainModule.FileName);
或者:
string path=Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase);