Exception handling

Answer Posted / pavan

Yes. Multiple catch blocks may be put in a try block. See
code example below, to see multiple catch blocks being used
in C#.

class ClassA
{
public static void Main()
{
int y = 0;
try
{
val = 100/y;
Console.WriteLine("Line not executed");
}
catch(DivideByZeroException ex)
{
Console.WriteLine("DivideByZeroException" );
}
catch(Exception ex)
{
Console.WritLine("Some Exception" );
}
finally
{
Console.WriteLine("This Finally Line gets executed always");
}
Console.WriteLine("Result is {0}",val);
}
}

Read more:
http://discuss.itacumens.com/index.php?topic=17579.0#ixzz12vqW9paZ















... · ADO works with connected data. This
means ...
... when you access data, such as viewing and updating
data, it is real-time, with a ...
... being used all the time.

ADO.NET supports disconnected architecture. ...
... you access data, ADO.NET makes a copy of the data using
XML. ...
... make any requested updates. This makes ADO.NET
efficient to use for Web ...
... .

· ADO has one main object that is used to ...
... to create a new set of records. With ADO.NET, you have
various objects that ...
... relational model of your database.

· ADO allows you to create client-side ...
... only, whereas ADO.NET gives you the choice of using ...
... -side or server-side cursors. Whereas ADO allows you to
persist records in XML ...
... , ADO.NET allows you to manipulate data using. ...

Read more:
http://discuss.itacumens.com/index.php?action=search2#ixzz12w06GrN6
























The DataAdapter object
plays the middleman between DataSet and database.
The DataSet represents a rich subset of the entire database,
cached on your machine without a continuous connection to
the database. The DataSet is comrised of DataTable objects
as well as Datarelation objects.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Differentiate between Server.Transfer and Response.Redirect with functionality? Why we can choose one over the other?

853


Explain why it is useful to use mvc instead of webforms? : asp.net mvc

802


How many types of server controls do we have?Also explain differance between them taking an example of ASP.NET?

2576


What is GAC in ASP.NET 2.0

802


How ASP and ASP.NET page works? Explain about asp.net page life cycle?

774


Can you change a master page dynamically at runtime? How?

686


Explain what does mvc represent in asp.net? : asp.net mvc

695


What is the difference between session and viewstate?

711


I am trying to implement sorting facility from client side code in GridView Control. So how can I fill up an Array inside client side code (using JavaScript), i want to assign my DataSet object declared and filled up on Server side(in code behind) to the array (on client side)

1735


What are the main requirements for caching?

753


What is the difference between mvc and asp.net? : Asp.Net MVC

695


What is httpresponse?

716


What is the purpose of using MVC programming pattern in ASP.NET?

768


What is a web farm?

765


What are sessions in asp net?

738