Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Just semantics - need an opinion
Message
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Titre:
Just semantics - need an opinion
Versions des environnements
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01577217
Message ID:
01577217
Vues:
66
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform