how do you do exception management

Answer Posted / manish agrahari

try
{
//try and do something here...
}
catch (SomeExeption ex)
{
//Handle the exception and take appropriate action
}
finally
{
//This code will *always* run irrespective if you have
//an exception or not. Usually this is some clean up of
//some sort though.
}

Is This Answer Correct ?    15 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between CONST and READONLY?

565


How do you create empty strings in c#?

506


Why do we need to override in c#?

514


How can I use .NET components from COM programs?

485


What is sqlconnection in c#?

484






What is a web service in c#?

575


What is property c#?

500


What is parallel programming in c#?

481


Can you specify nested classes as partial classes?

499


what is the meaning of Object lifetime in OOPS

528


Differentiate between response.expires and response.expiresabsolute?

530


What is the difference between returning iqueryable vs ienumerable?

444


What is an xsd file?

498


What is string empty?

493


Why are strings immutable in c#?

484