You have seen declarations of various Visual Basic entities, such as classes, methods, variables and parameters. Declarations introduce names that are used to refer to such entities. A declaration’s Scope is the portion of the program that can refer to the declared entity by its name without qualification. Such an entity is said to be “in scope” for that portion of the program. This section introduces several important scope issues.
The basic scopes are as follows:
Block scope— The scope of a variable declared in a block is from the point of the declaration to the end of the block (e.g., a variable declared in a control statement’s body is in scope only until the end of that control statement).
Method scope— The scope ...