Here I will post problems I and my colleagues met and solutions we found.

Friday, October 17, 2008

Variable number of parameters in C#

I wish I knew it before, it would save me few hours (don't ask me why).

Apparently it is possible to make variable number of parameters in method using keyword params.

There are obvious limitations, it can be only the last parameters of the same time. But nevertheless, I think it's cool.

There is positive result for me not knowing that. Now I finally figured out how to work with regular expression, see Regex class. This is really powerful tool to have too.