获取bin目录

System.AppDomain.CurrentDomain.SetupInformation.ApplicationBase;//获取bin\Debug\目录
System.AppDomain.CurrentDomain.BaseDirectory;//获取bin\Debug\目录
System.Environment.CurrentDirectory;//获取bin\Debug目录
System.IO.Directory.GetCurrentDirectory();//获取bin\Debug目录
System.Windows.Forms.Application.StartupPath;//获取bin\Debug目录
System.Windows.Forms.Application.ExecutablePath;//获取bin\Debug\程序.exe

猜你喜欢

转载自www.cnblogs.com/WeiYongZhi/p/10056988.html