[备忘]C#取得当前应用程序的运行路径
string pat = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().CodeBase)
说明:
System.Reflection.Assembly.GetExecutingAssembly().CodeBase
取得应用程序的路径(包括程序名)
同样也适用于开发Windows Service
说明:
System.Reflection.Assembly.GetExecutingAssembly().CodeBase
取得应用程序的路径(包括程序名)
同样也适用于开发Windows Service
浙公网安备 33010602011771号