Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Just semantics - need an opinion
Message
 
 
To
All
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Title:
Just semantics - need an opinion
Environment versions
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01577217
Message ID:
01577217
Views:
67
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
Next
Reply
Map
View

Click here to load this message in the networking platform