In C#, the life or accessibility of an object or type is determined by its scope. C# has the following scopes:
Namespace
Class
Method
Curly braces ({}) inside a method
We will discuss scope and accessibility in Chapter 5, which covers classes and methods. But to give you an idea of how scopes work, the following shows examples of namespace, class, and method-level scopes.