About
In this code snippet, we will take a look at variable scope and code blocks in C#.
A code block is the space between two { }. Variables can be considered out of or in scope depending on whether they are accessible or not from a particular code block.
Let’s just have a look at the code below.