Which is better, passing parameters to an object or setting properties of the object? Is there some kind of thumb rule to make the decision?
Printable View
Which is better, passing parameters to an object or setting properties of the object? Is there some kind of thumb rule to make the decision?
I asume you mean passing parameter when declaring a new object ().
This is easier and cleaner then setting them individually.
Could you give an example of what you mean?