日期:2014-05-17 浏览次数:20505 次
MethodInfo m = this.GetType().GetMethod("GetTitle");
if (m != null)
{
string text = m.Invoke(this, new object[] { }).ToString();
return text;
}
else
{
return "error";
}
// 上面的代码是在 aspx.cs文件中的,调用的方法 GetTitle() 是在该 aspx.cs 继承的类中的
// m 总是为 null ,不能实例化