Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Exception or return boolean?
Message
From
10/01/2009 06:25:24
 
 
To
10/01/2009 05:30:28
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
C# 3.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01372501
Message ID:
01372516
Views:
17
>>>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().....
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform