News for hackers. Stuff that matters.
Re:Welcome to C# 10 by int_19h on Monday November 08, 2021 @04:11PM (#29154337)
You wouldn't even have to get lambdas involved for this problem to surface. Consider something like this:

   void Foo(double x) { ... }

   Foo(123);
This works, but now I add an overload:

   void Foo(decimal x) { ... }
and the above call is now ambiguous. Note that this example goes all the way back to C# 1.0!

Method overloading (and how it interacts with other language features) is probably the single most complicated part of C# today, for good reasons.

There are no comments on this comment yet.