http://jcserver.blog.163.com/blog/static/24044859200851582354135/
通常我们WinForm编程时,要获取程序当 前运行的文件夹路径会用Application.StartupPath ,但是Application.StartupPath在编写类库项目时却无法 使用,因为我们根本无法用using System.Windows.Forms;来引入Application.StartupPath 的命名空间,这个时侯我们要用AppDomain.CurrentDomain.BaseDirectory。
private static string fullPathFileName = Application.StartupPath + "//Set.Ini "; //用于WINFORM
private static string fullPathFileName = AppDomain.CurrentDomain.BaseDirectory+"//Set.Ini"; //用于类项目