Since making a type nullable essentially makes the variable “optional”, I’m wondering when it’s appropriate to use nullable types in method parameters in order to make them optional when using an overload could accomplish the same thing?
Since making a type nullable essentially makes the variable optional, I’m wondering when it’s
Share
I wouldn’t – you’ll end up with a lot of
null, null, null. In C# 4.0 you have optional parameters and named arguments; wait a few more months and consider using them. Until then, overloads, or pass it objects that represent the args: