获取应用程序路径的区别

 

代码
//输出:C:\Users\Administrator\Desktop\ResFinder\ResFinder\bin\Debug
//string filepath = System.IO.Directory.GetCurrentDirectory();
   
//输出:C:\Users\Administrator\Desktop\ResFinder\ResFinder\bin\Debug\
//string filepath = AppDomain.CurrentDomain.BaseDirectory;

//输出:C:\Users\Administrator\Desktop\ResFinder\ResFinder\bin\Debug
//string filepath = Application.StartupPath;       

//输出:C:\Users\Administrator\Desktop\ResFinder\ResFinder\bin\Debug\ResFinder.exe
//string filepath = Application.ExecutablePath; 

//输出:C:\Users\Administrator\Desktop\ResFinder\ResFinder\bin\Debug\
//string filepath = AppDomain.CurrentDomain.SetupInformation.ApplicationBase;

 


 

posted on 2011-02-14 16:09  Neo0820  阅读(266)  评论(0编辑  收藏  举报

导航