Visual Basic 的宣告項目Declared Elements in Visual Basic

「宣告項目」是宣告陳述式中定義的程式設計項目。A declared element is a programming element that is defined in a declaration statement. 宣告項目包含變數、常數、列舉、類別、結構、模組、介面、程序、程序參數、函式傳回、外部程序參考、運算子、屬性、事件和委派。Declared elements include variables, constants, enumerations, classes, structures, modules, interfaces, procedures, procedure parameters, function returns, external procedure references, operators, properties, events, and delegates.

宣告陳述式包含下列各項:Declaration statements include the following:

本節內容In This Section

宣告項目名稱Declared Element Names
描述如何為項目命名與使用字母大小寫。Describes how to name elements and use alphabetic case.

宣告項目特性Declared Element Characteristics
涵蓋宣告項目所擁有的特性,例如範圍。Covers characteristics, such as scope, possessed by declared elements.

對已宣告項目的參考References to Declared Elements
描述編譯器如何將參考對應至宣告,以及如何限定名稱。Describes how the compiler matches a reference to a declaration and how to qualify a name.

程式結構和程式碼慣例Program Structure and Code Conventions
提供讓您的程式碼更容易閱讀、了解和維護的方針。Presents guidelines for making your code easier to read, understand, and maintain.

陳述式Statements
描述命名及定義程序、變數、陣列和常數的陳述式。Describes statements that name and define procedures, variables, arrays, and constants.

宣告內容和預設存取層級Declaration Contexts and Default Access Levels
列出宣告項目的類型,並針對每個宣告陳述式,顯示您可以宣告的內容及預設存取層級。Lists the types of declared elements and shows for each one its declaration statement, in what context you can declare it, and its default access level.