Problems with params array?
I noticed today that the ever-popular String.Format() method has several overloads - in addition to the Format(string format, params object[] args) overload I was expecting, it seems there are three special-case overloads for one, two or three parameters. A glance with Reflector shows that these three overloads simply instantiate a new object[] with the given args and pass them on to the main overload.
Does anyone have any idea why it's doing that? Is there some sort of performance penalty involved with using params array that the BCL team decided to bypass by special-casing the most common instances?
I was given to understand that that params token is a compile-time only feature of the C# language, and shouldn't have any effect after compilation.
Interesting.