//SDK AppID
public static int appid;
//App Key
public static string appkey;
//模板Id
public static int tmplId;
//phone
红岩里的主要人物
public static string phone;
//1、定义数组,来⽤接收txt⾥的内容
public static Dictionary<string, string> dic = new Dictionary<string, string>();
//2、读取远程txt配置⽂件的⽂件
public static void getMySet()
{
//读取⽹络上的txt⽂件
回答快的成语
WebClient client = new WebClient();
byte[] buffer = client.DownloadData("域名/");
string res = System.Text.ASCIIEncoding.ASCII.GetString(buffer);
string[] items = res.Split(',');//⽤逗号来分割内容
读取配置文件失败for (int i = 0; i < items.Length; i++)
{
string str = items[i].Replace("\r\n", "");
飞信积分兑换麦当劳string a1 = str.Substring(0, str.IndexOf("="));
string a2 = str.Substring(str.IndexOf("=") + 1);
dic.Add(a1, a2);
}
//设置参数
if(dic.ContainsKey("appid")) //先判断是否存在这个key
{
appid = Convert.ToInt32(dic["appid"]);
}
银行贷款利率if (dic.ContainsKey("appkey"))
{
appkey = dic["appkey"];
六盘水旅游}
if (dic.ContainsKey("tmplId"))
{
tmplId = Convert.ToInt32(dic["tmplId"]);
}
if (dic.ContainsKey("phone"))
{
phone = dic["phone"];
}
}