PC机和移动设备上绝对路径的获取

获取PC上的绝对路径
string appPath = Application.StartupPath;//获取路径
INIFile ini = new INIFile(appPath + @"\config.ini");

获取移动设备开发中的绝对路径
string appPath =System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase);//获取路径
INIFile ini = new INIFile(appPath + @"\config.ini");

posted @ 2013-05-23 13:51  婴年早肥  阅读(153)  评论(0)    收藏  举报