Assume you have a Writer
class that writes obj
to fileName
. Would you rather do
new Writer(fileName, obj).Write();
or
Writer.Write(fileName, obj);
?
In case Writer
is divided into sub methods you don't have to pass obj
to every new method in the first case. The second approach is probably faster and doesn't instantiate a new object.