Extension methods overloading in C#, does it work?
问题 Having a class that has a method, like this: class Window { public void Display(Button button) { // ... } } is it possible to overload the method with another one that is more broad, like this: class WindowExtensions { public void Display(this Window window, object o) { Button button = BlahBlah(o); window.Display(button); } } What happened when I tried is that I have infinite recursion. Is there a way to make that work? I want the extension method to be called only when the other method can't