读取配置文件返回键值对
private Dictionary<string,string> ReadConfig() { try { using (FileStream fs = new FileStream("config.json", FileMode.Open)) { using (StreamReader sr = new StreamReader(fs)) { return JsonConvert.DeserializeObject<Dictionary<string, string>>(sr.ReadToEnd()); } } } catch (Exception ex) { throw ex; } }


浙公网安备 33010602011771号