Error handling and how this is done ?
Answer Posted / senthil kumar
Error handling is the display the unknown error during the
runtime.here we can use the exception to handle the
error.we also have tje throw exception but its very
difficult to predict the place to identify the error.
try
{
//set of processing code
}
catch(Exception e)
{
Console.WriteLine("Error:"+e.Message);
}
finaly
{
Console.WriteLine("Example Program for the Error
Handling");
}
here set of codes will be executed if any error has found
it will throw the exception from catch block.But finally
will executed compulsarily whether error occured or not
event if you teriminate the control outside from block.
| Is This Answer Correct ? | 4 Yes | 1 No |
Post New Answer View All Answers
What is a struct in C#?
What is a dbml?
What are virtual classes in c#?
List the two important objects of ado.net and also list the namespaces that are commonly used in ado.net to aid in connection to a database.
What is garbage collection? How to force garbage collector to run?
What are the Uses of CLR
Explain the role of the datareader class in ado.net connections?
What are accessors?
Explain the difference between access specifier and access modifier in c#?
Can abstract class be instantiated c#?
4. Describe the process when we send a request URL? And who is responsible for that?
Which namespaces are necessary to create a localized application?
What is the difference between internal and private in c#?
What is string programming language?
What are the collections in c#?