The Scope and Lifetime of Variables : Variable Scope : Language Basics C# Examples


C# Examples » Language Basics » Variable Scope »

 

The Scope and Lifetime of Variables






A block is begun with an opening curly brace and ended by a closing curly brace.
A block defines a declaration space, or scope.
Each time you start a new block, you are creating a new scope.
Variables are created when their scope is entered and destroyed when their scope is left.




HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Language Basics
» Variable Scope