Catalog / Visual Basic .NET Cheat Sheet
Visual Basic .NET Cheat Sheet
A concise reference for Visual Basic .NET (VB.NET) syntax, concepts, and common tasks.
Language Basics
Data Types
|
True or False value. |
|
8-bit unsigned integer (0 to 255). |
|
16-bit signed integer (-32,768 to 32,767). |
|
32-bit signed integer (-2,147,483,648 to 2,147,483,647). |
|
64-bit signed integer (-9,223,372,036,854,775,808 to 9,223,372,036,854,775,807). |
|
32-bit floating-point number. |
|
64-bit floating-point number. |
|
128-bit data type suitable for financial and monetary calculations. |
|
Sequence of Unicode characters. |
|
Represents a date and time value. |
Variable Declaration
Example:
|
Example:
|
Operators
Arithmetic |
|
Comparison |
|
Logical |
|
Concatenation |
|
Assignment |
|
Control Flow
Conditional Statements
|
|
Looping Structures
|
|
|
|
Exception Handling
|
|
Procedures and Functions
Sub Procedures (Void)
Example:
|
Function Procedures (Return Value)
Example:
|
Parameters
|
Passes a variable by value (a copy is passed). |
|
Passes a variable by reference (the original variable is passed, allowing modification). |
|
Specifies that a parameter is optional. Must have a default value.
|
|
Allows a procedure to accept an arbitrary number of arguments of a specified type.
|
Object-Oriented Programming
Classes
Example:
|
Properties
Example:
|
Inheritance
Example:
|
Interfaces
Example:
|