Click here to Skip to main content
15,890,512 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
When creating your own exception class, how do you decide whether it should be checked or unchecked?
Posted
Updated 2-Dec-10 21:50pm
v2
Comments
Dalek Dave 3-Dec-10 3:50am    
Minor Edit for Grammar.
JOAT-MON 3-Dec-10 5:15am    
As a side note, 'checked' and 'unchecked' are keywords in C# that have to do with explicitly checking for arithmetic and conversion overflows: http://msdn.microsoft.com/en-us/library/74b4xzyw.aspx

1 solution

I'm assuming you are a Java dev trying out C#, otherwise I don't understand your questions (if so can you clarify, or you might need to change the tag from "C#" to "Java"!).

You'll be saddened (or delighted!) to learn C# doesn't have the equivalent of checked an unchecked exceptions. All exceptions in c# are like Java unchecked exceptions.
Here[^] is a comparison between Java and C#. Some if it is a little out of date (IMO C# drew level with Java at v2.0, and overtook at 3.0) but the most of the comparisons are good, if a little Java Biased :-).
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900