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's the c# syntax to catch any possible exception?
So let's say I have an application that uses myapp.dll assembly, version 1.0.0.0. There is a security bug in that assembly, and I publish the patch, issuing it under name myapp.dll 1.1.0.0. How do I tell the client applications that are already installed to start using this new myapp.dll?
Write a short note on interface?
What is oledbconnection c#?
What is ienumerable and iqueryable?
Is array ienumerable c#?
What sort algorithm does c# use?
When Should You Call The Garbage Collector In .net?
What are the types of methods in c#?
Is list passed by reference c#?
If dll and exe files are same it means you can deploy both the files in gac?
List the difference between interface and abstract class?
What is a view? What is the use of it?
Why are dynamic link library used over static one?
What are the boolean data types in c#?