Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class C<X, Y> { }
- static class Program
- {
- static void M<X, Y, Z>(C<X, Y> c, System.Func<Y, Z> m) { }
- static int E(this object o, int v) { return v; }
- static void Main() {
- var o = default(object);
- M(default(C<int, int>), o.E);
- }
- }
- // error CS1502: The best overloaded method match for 'Program.M<int,int,int>(C<int,int>, System.Func<int,int>)' has some invalid arguments
- // error CS1503: Argument 2: cannot convert from 'method group' to 'System.Func<int,int>'
Advertisement
Add Comment
Please, Sign In to add comment