【发布时间】:2012-02-27 17:45:30
【问题描述】:
是否可以从方法符号中获取 MethodInfo 对象?
因此与以下内容相同:
typeof(SomeClassSymbol) // this gets you a Type object
这是我想做的:
public class Meatwad
{
MethodInfo method;
public Meatwad()
{
method = ReflectionThingy.GetMethodInfo(SomeMethod);
}
public void SomeMethod() { }
}
如何实现 ReflectionThingy.GetMethodInfo?鉴于这甚至是可能的,那么重载方法呢?
【问题讨论】:
-
有点相关,我觉得:In Foof We Trust
-
Eric Lippert 的“In Foof We Trust: A Dialog”链接在上面断开了。现在是docs.microsoft.com/en-us/archive/blogs/ericlippert/…
标签: c# .net reflection