Ambiguous method call with Action<T> parameter overload
I encountered some unexpected compiler behaviour when calling overloaded method with different Action<T> variations. Let's say I have this class Test and I'm creating its instance in the CallTest constructor. public class Test { public Test(Action<long> arg) { } public Test(Action<decimal> arg) { } } public class CallTest { public CallTest() { Test t = new Test(TestDecimal); } public void TestDecimal(decimal arg) { } public void TestLong(long arg) { } } When calling the Test constructor with either TestDecimal or TestLong as a parameter I'm receiving the following error: The call is ambiguous