Skip to content

Instantly share code, notes, and snippets.

@distantcam distantcam/Puzzle.cs
Created Jul 27, 2016

Embed
What would you like to do?
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
You can’t perform that action at this time.