标签: c# lambda delegates expression expression-trees
我注意到我可以这样做:
private static Func<int, int> foo = x => x + 1; private static Expression<Func<int, int>> bar = x => x + 1;
但是我不能做一个隐含的演员:
private static Expression<Func<int, int>> baz = foo; // won't compile
在C#中,有没有办法从委托创建表达式(来自Func)?