Error handling and how this is done ?
Answers were Sorted based on User's Feedback
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 |
Error handling is the Main concept of debugging.
This can be done by creating the log files when an
exception is occurred to trace the error where exactly it
occurred..
Example:
try
{
Your code;
}
catch(exception e)
{
Here you can log the error by using object e;
}
Is This Answer Correct ? | 1 Yes | 0 No |
Explain how to use an extender provider in the project.
Is string value type c#?
What is the solution if you need to manipulate sets of items?
What is the difference between throw and throw ex?
What is difference between singleton and static class in c#?
What is xaml in c#?
How to prevent the error while updating ui control from another thread?
How to override a function in c#?
Why do we Need of static class in c#?
Is c# the same as d flat?
Explain about CTS?
Why do we use delegates?