Skip to content

Instantly share code, notes, and snippets.

@distantcam
Created July 27, 2016 07:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save distantcam/b6d5a34c2cfb72cbe8040d2b925c74e9 to your computer and use it in GitHub Desktop.
Save distantcam/b6d5a34c2cfb72cbe8040d2b925c74e9 to your computer and use it in GitHub Desktop.
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