String html="abcdefg{#getinfo()#}hijk";
html.Replace(htmname, m.Groups["meth"].Value).ToString()
请问下变量 htmname 获取到的是 {#getinfo()#} 而 m.Groups["meth"].Value 获取到的是getinfo()这个方法,而现在我如何在此执行这个方法
html.Replace(htmname, m.Groups["meth"].Value).ToString()
请问下变量 htmname 获取到的是 {#getinfo()#} 而 m.Groups["meth"].Value 获取到的是getinfo()这个方法,而现在我如何在此执行这个方法
解决方案 »
- 简单的小问题.难死我了..............
- 不同服务器数据库 从A表查询插入B表,怎么写sql
- 关于投票的问题?很急!谢谢大家了
- 200分,请高人说明白,以下问题“特性(Attribute)在实际开发中有用”“什么是滥用反射。”“反射+特性,有什么实际用处。”,请注意,
- 请问大家是用的什么架构啊,说说架构的思想啊
- dorpDownList联动问题
- 新手问题(谢谢您回答)为什么不可以更新数据库,SQL没错啊,就是不执行更新55555555
- .net问题
- 用户访问含有OWC控件的网页,结果显示Office Web Component的Logo
- 怎么把SQL SERVER 中的表进行列转换啊,(急在线等待0
- asp.net实现打开网页没有地址栏
- 【高性能网站建议指南】
m.Groups["meth"].Value=getinfo()
public static string GetTempleInfo()
{
string html ="abcdefg{#getinfo()#}hijk";
Regex re = new Regex(@"{#(?<meth>[^{]*)#}");
MatchCollection mc = re.Matches(html);
foreach (Match m in mc)
{
string htmname = "{#" + m.Groups["meth"].Value + "#}";
html = html.Replace(htmname, m.Groups["meth"].Value).ToString();
}
return html;
}
mi.Invoke(参数); //参数为getinfo()方法所需要的参数