Possible Duplicate:
Should you declare methods using overloads or optional parameters in C# 4.0?
Hi have a method that is increasingly getting more parameters. The thing is that most of these parameters are optional as they will only affect the method in certain cases and are not needed for most instances that the method is called.
Now the question is should i use
Optional parameters
public object MyMethod(string param1, string param2, string optionalParam = null)
Overloaded methods
public object MyMethod(string param1, string param2, null)
public object MyMethod(string param1, string param2, string optionalParam)
Properties
Suggestions welcome