Visual Basic Language Specification
Visual Basic Language Specification
Visual Basic Language Specification
1.
Inheritance
Introduction
4.3
The Microsoft
Visual Basic
Language Specification
Version 11.0
Inheritance
Filename: 341522484 3
The names of actual companies and products mentioned herein may be the
trademarks of their respective owners.
Table of Contents
1. Introduction..............................................................................................
1.1 Grammar Notation....................................................................................................
1.2 Compatibility.............................................................................................................
1.2.1 Kinds of compatibility breaks..............................................................................
1.2.2 Impact Criteria....................................................................................................
1.2.3 Language deprecation........................................................................................
2. Lexical Grammar.......................................................................................
2.1 Characters and Lines.................................................................................................
2.1.1 Line Terminators.................................................................................................
2.1.2 Line Continuation................................................................................................
2.1.3 White Space........................................................................................................
2.1.4 Comments..........................................................................................................
2.2 Identifiers..................................................................................................................
2.2.1 Type Characters..................................................................................................
2.3 Keywords...................................................................................................................
2.4 Literals....................................................................................................................
2.4.1 Boolean Literals................................................................................................
2.4.2 Integer Literals..................................................................................................
2.4.3 Floating-Point Literals.......................................................................................
2.4.4 String Literals....................................................................................................
2.4.5 Character Literals.............................................................................................
2.4.6 Date Literals.....................................................................................................
2.4.7 Nothing.............................................................................................................
2.5 Separators...............................................................................................................
2.6 Operator Characters................................................................................................
3. Preprocessing Directives.........................................................................
3.1 Conditional Compilation..........................................................................................
3.1.1 Conditional Constant Directives........................................................................
3.1.2 Conditional Compilation Directives...................................................................
3.2 External Source Directives......................................................................................
Filename: 341522484 5
Filename: 341522484 7
9.3 Constructors..........................................................................................................
9.3.1 Instance Constructors.....................................................................................
9.3.2 Shared Constructors.......................................................................................
9.4 Events...................................................................................................................
9.4.1 Custom Events................................................................................................
9.5 Constants..............................................................................................................
9.6 Instance and Shared Variables..............................................................................
9.6.1 Read-Only Variables........................................................................................
9.6.2 WithEvents Variables......................................................................................
9.6.3 Variable Initializers..........................................................................................
9.6.3.1 Regular Initializers....................................................................................
9.6.3.2 Object Initializers......................................................................................
9.6.3.3 Array-Size Initializers................................................................................
9.6.4 System.MarshalByRefObject Classes..............................................................
9.7 Properties..............................................................................................................
9.7.1 Get Accessor Declarations..............................................................................
9.7.2 Set Accessor Declarations...............................................................................
9.7.3 Default Properties...........................................................................................
9.7.4 Automatically Implemented Properties...........................................................
9.7.5 Iterator Properties...........................................................................................
9.8 Operators..............................................................................................................
9.8.1 Unary Operators.............................................................................................
9.8.2 Binary Operators.............................................................................................
9.8.3 Conversion Operators.....................................................................................
9.8.4 Operator Mapping...........................................................................................
10. Statements..........................................................................................
10.1 Control Flow........................................................................................................
10.1.1 Regular Methods...........................................................................................
10.1.2 Iterator Methods...........................................................................................
10.1.3 Async methods.............................................................................................
10.1.4 Blocks and Labels.........................................................................................
10.1.5 Local Variables and Parameters....................................................................
10.2 Local Declaration Statements.............................................................................
10.2.1 Implicit Local Declarations............................................................................
10.3 With Statement...................................................................................................
10.4 SyncLock Statement............................................................................................
10.5 Event Statements................................................................................................
10.5.1 RaiseEvent Statement..................................................................................
10.5.2 AddHandler and RemoveHandler Statements...............................................
10.6 Assignment Statements......................................................................................
10.6.1 Regular Assignment Statements...................................................................
Filename: 341522484 9
Filename: 341522484 11
Filename: 341522484 13
13.1.4 Literals..........................................................................................................
13.2 Preprocessing Directives.....................................................................................
13.2.1 Conditional Compilation................................................................................
13.2.2 External Source Directives............................................................................
13.2.3 Region Directives..........................................................................................
13.2.4 External Checksum Directives......................................................................
13.3 Syntactic Grammar.............................................................................................
13.3.1 Attributes......................................................................................................
13.3.2 Source Files and Namespaces.......................................................................
13.3.3 Types.............................................................................................................
13.3.4 Type Members...............................................................................................
13.3.5 Statements...................................................................................................
13.3.6 Expressions...................................................................................................
14. Change List.........................................................................................
14.1 Version 7.1 to Version 8.0....................................................................................
14.1.1 Major changes...............................................................................................
14.1.2 Minor changes..............................................................................................
14.1.3 Clarifications/Errata......................................................................................
14.1.4 Miscellaneous...............................................................................................
14.2 Version 8.0 to Version 8.0 (2nd Edition)................................................................
14.2.1 Minor changes..............................................................................................
14.2.2 Clarifications/Errata......................................................................................
14.2.3 Miscellaneous...............................................................................................
14.3 Version 8.0 (2nd Edition) to Version 9.0................................................................
14.3.1 Major Changes..............................................................................................
14.3.2 Minor Changes..............................................................................................
14.3.3 Clarifications/Errata......................................................................................
14.3.4 Miscellaneous...............................................................................................
14.4 Version 9.0 to Version 10.0..................................................................................
14.4.1 Major Changes..............................................................................................
14.4.2 Minor Changes..............................................................................................
14.4.3 Clarifications/Errata......................................................................................