Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Exception or return boolean?
Message
De
10/01/2009 06:25:24
 
 
À
10/01/2009 05:30:28
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
C# 3.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01372501
Message ID:
01372516
Vues:
18
>>>HI,
>>>May I know any guideline to decide when to throw exception instead of return boolean from method, especially in business rules checking?
>>>
>>>Thank you
>>
>>FWIW, I tend to disagree with Mike on this one. These are more to my thinking:
>>http://www.codeproject.com/KB/dotnet/When_to_use_exceptions.aspx
>>http://www.guidanceshare.com/wiki/.NET_2.0_Performance_Guidelines_-_Exception_Management
>
>That is why they have added TryGetValue() to the Dictionary class
>
>http://msdn.microsoft.com/en-us/library/bb347013.aspx - see under remarks

Yep. Same with TryParse().....
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform