Behind the Brain

C# and default parameters

I'm currently porting a C++ library to C# and I really start to miss default parameters in C#

When I have the function

void doSomething( int param1=0, int param2=1, int param3=2, int param4=3 )
I would have to create 5 (in words *FIVE*) overloads for this method... This really sucks... and all just because the guys at Microsoft where too lazy to implement them.

I really love C# but this is something that really annoys me *sigh*

Jul 25th 2010, 21:06 by Sylence.

Back to top