#csharpmalayalam #dotnetmalayalam #exceptions #exceptionhandling #programmingmalayalam
To know more about our web development courses : +91 88487 97887
Code Notes:
C# Exceptions - Try..Catch
When an error occurs the program will stop and terminates. We call it as an
exception, we cannot avoid all errors but we can make the program stop normally
even if the error occurs. For that we use the try catch.
Syntax for this
try
{
// Block of code to try
}
catch (Exception e)
{
// Block of code to handle errors
}
finally
{
// Block of code which runs finally whether error occurs or not
}