Hi everybody,
Yesterday I added a DateRange class and also added a static method for this class ToString that prints StartDate thru EndDate. However, in some methods I see I am printing thru and in some through. So, somehow I want to be able to accommodate both variations. And therefore I have a question as how this simple thing is usually handled.
Is it another ToString method with some extra parameter? Or another method ToLongString? Or a single method with optional parameter and if parameter = false one output otherwise another?
Just tell me your preference, please.
One more idea - since it used for logging only (as far as I can tell so far) use through everywhere.
Thanks in advance.
If it's not broken, fix it until it is.
My Blog