1
我有如下因素線:從Reflection調用靜態委託?
public static class Foo
{
public static Func<object,string> Bar = myObject => myObject.ToString();
}
有沒有辦法在C#中使用反射來執行類似Foo.Bar(someObject);
。正如我所看到的,Bar不是方法,當然是字段,我不能使用MethodInfo.Invoke();
完美,它的工作原理! –