62,271
社区成员
发帖
与我相关
我的任务
分享
public static string HtReplace(string Source, Hashtable Ht)
{
foreach (DictionaryEntry De in Ht)
{
Source = Source.Replace(De.Key.ToString(), De.Value.ToString());
}
return Source;
}
Hashtable ht = new Hashtable();
string CID= "去替换CID的内容";
string ItemDefault_shtml ="读模版后的字符串,里面有类似自己命名的{CID}";
ht.Add("$CID$", CID);
HtReplace(ItemDefault_shtml, ht)