Take a look at the following code
namespace OverLoadTest
{
class Program
{
static void Main(string[] args)
{
ulong value = 10;
var foo = new Foo();
foo.DoStuff(value);
}
}
public class Foo
{
public void DoStuff(float value)
{
// This is the resolved overload even if we have an extension method that takes ulong
}
}
public static class FooExtensions
{
public static void DoStuff(this Foo foo, ulong value)
{
}
}
}
Can someone explain why the extension method taking an ulong
is not invoked here?