try and catch

Exception Handling in C#

Submitted by donbermoy on
Sometimes, we encounter different errors along the program whenever we executed it. For example, the file does not exist in the given path, network connections are not connected, or any errors that you have experienced when you're learning how to program. This is what we've called Runtime Errors. One way to prevent it is the Structured exception handling. In this tutorial for C#, we will used the Try-Catch-Finally statement.