C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Forums » .NET » .NET »

How to throw an caught exception from cath block?


Posted Date: 28 Sep 2008      Posted By: partha chowdhury      Member Level: Silver     Points: 1   Responses: 2



How to throw an caught exception from cath block?




Responses

Author: Vivek    28 Sep 2008Member Level: GoldRating: 3 out of 53 out of 53 out of 5     Points: 3

Yes, you can throw your own exception like below
try
{
// your code
}
catch(Exception e)
{
throw new Exception("My Exception");
}

or

try
{
// your code
}
catch(Exception e)
{
throw e;
}



Author: Bindu Bujji    28 Sep 2008Member Level: GoldRating: 2 out of 52 out of 5     Points: 2

use like this.
catch(Exception e)
{
throw new Exception("your Exception Name ");
}


Bindu



Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.


Next : what is output parameter and parameter array?
Previous : Did it possible to cast a generic type of derived class to generic type of base class?
Return to Discussion Forum
Post New Message
Category: .NET

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use