Created
July 27, 2016 07:42
-
-
Save distantcam/b6d5a34c2cfb72cbe8040d2b925c74e9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Threading.Tasks; | |
class Program | |
{ | |
static void Main() | |
{ | |
Util.Method(() => ActionMethod()); | |
Util.Method(ActionMethod); // Error CS0121 The call is ambiguous between the following methods or properties: 'Util.Method(Action)' and 'Util.Method(Func<Task>)' | |
} | |
private static void ActionMethod() | |
{ | |
} | |
} | |
public static class Util | |
{ | |
public static void Method(Action action) | |
{ | |
} | |
public static void Method(Func<Task> actionAsync) | |
{ | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment