private static bool ReadXmlFileSet() { bool ReadXmlFileSet = false; string appPath = ""; string _appPath = ""; //读取Xml数据信息对象 ReadWriterXml w_ReadWriterXml = new ReadWriterXml(); //读取结果 string Value = ""; try { //根目录 _appPath = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase); //**********取得程序根目录***********文件名*****// appPath = Common._appPath + "\\" + "SysConfig.xml"; //读取值************************路径*******节点*********Key********// Value = w_ReadWriterXml.ReadXml(appPath, "Section", "Key"); ReadXmlFileSet = true; } catch (Exception ex) { throw ex; } return ReadXmlFileSet; }
时间: 2024-09-26 20:20:02