我已经创建了将属性lambda转换为委托的方法:{var result = Expression.Lambda(propertyLambda.Body).Compile();}Delegate getter= MakeGetter(() => SomeClass.SomeProperty);
obje
new StandardBar();}
不能从用法中推断方法ConsoleApplication1.Foo.GetBarCore<TBar>(System.Func<TBar>)的类型参数。更令人惊讶的是,如果如错误消息所示,显式指定类型参数(导致GetBarCore<StandardBar>(getter: Find)),则还可以成功编译代码。我对代码文件做了非常小的修