Navigation

Related Articles

Back to Latest Articles

C# Basics – Exception Handling Statements – Part 9

We take a look at exception handling statements in C# programming language.


Andraz Krzisnik
C# Basics – Exception Handling...

Exception Handling Statements

Sometimes, there comes a situation that where our code might crash. We can handle these kind of situations with exception handling statements. By putting our code into these statements we can test if our code works. And in any case that our code would contain an error, we could execute a block of our own code instead.

We’ll take a look at try… catch… blocks.

So basically if something goes wrong in try block, code in catch block gets executed.

try
{
    //code with error
}
catch
{
    //code executed when error is found in try{...}
}
Next Chapter
Show Comments (0)

Comments

Related Articles

C# Tutorial

C# Tutorial: How To Apply Dilation To An Image

Dilation is a simple morphology process which changes pixel intensities based on the change of intensities that occur at object boundaries. This process is used on grayscale...

Posted on by Andraz Krzisnik
C# Tutorial

Intensity Level Slicing With C# – Explore Image Processing

In this tutorial we will be talking about intensity level slicing in image processing. What is Intensity Level Slicing It’s a process that highlights pixels in an arbitrary...

Posted on by Andraz Krzisnik