psz_511885035 2017-09-14 01:26 采纳率: 0%
浏览 276

PDA移动端不支持GetCurrentDirectory()改怎么解决?

static String CodePath = System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase;

CodePath = CodePath.Substring(0, CodePath.LastIndexOf(@"\"));

string path = CodePath + "\config\info.xml";

我用这种方式 为啥 类、结构或接口成员声明中的标记无效
之前是这样写的
//string path = Directory.GetCurrentDirectory() + "\config\info.xml";

  • 写回答

0条回答 默认 最新

    报告相同问题?