System.Environment

Denoting a Variable's Scope

In addition to prefixing a variable to denote its data type, you can and should use a prefix to denote its scope. The scope designation character precedes the data type prefix and is separated from it by an underscore. For example, to denote a module-level string variable, you can use a statement such as the following:

Dim m_strName As String 

Table 3-2 contains the prefixes that you use to describe scope.

 

Table 3-2. Prefixes for Variable Scope 

Prefix

Description

Example

g

Global

g_strSavePath

m

Local to module or form

m_blnDataChanged

st

Static

st_blnInHere

(no prefix)

Nonstatic, local to procedure

intIndex

 



Practical Standards for Microsoft Visual Basic. NET
Practical Standards for Microsoft Visual Basic .NET (Pro-Developer)
ISBN: 0735613567
EAN: 2147483647
Year: 2005
Pages: 84

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net