Click here to Skip to main content
15,899,474 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How I can benefit From "Throws a new exception"
How i can use it in my projects ? any example ?
Posted

You use it when you detect a problem in your application and what to indicate it to some other part of your code that can handle it, or cause your program to exit and tell the user - so that the error does not cause his data to be corrupted.

Try reading here: http://msdn.microsoft.com/en-us/library/vstudio/fk6t46tz.aspx[^] - it explains why, and gives an example.
 
Share this answer
 
there is friend of your's his name is GOOGLE. Pay him frequent visits and your question will be answered. here are some links

http://msdn.microsoft.com/en-us/library/ms173163.aspx[^]

http://stackoverflow.com/questions/2999298/difference-between-throw-and-throw-new-exception[^]
 
Share this answer
 

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



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