Visual Basic Language Features

 

Updated: July 20, 2015

For the latest documentation on Visual Studio 2017, see Visual Studio 2017 Documentation.

The following topics introduce and discuss the essential components of Visual Basic, an object-oriented programming language. After creating the user interface for your application using forms and controls, you need to write the code that defines the application's behavior. As with any modern programming language, Visual Basic supports a number of common programming constructs and language elements.

If you have programmed in other languages, much of the material covered in this section might seem familiar. While most of the constructs are similar to those in other languages, the event-driven nature of Visual Basic introduces some subtle differences.

If you are new to programming, the material in this section serves as an introduction to the basic building blocks for writing code. Once you understand the basics, you can create powerful applications using Visual Basic.

Arrays
Discusses making your code more compact and powerful by declaring and using arrays, which hold multiple related values.

Collection Initializers
Describes collection initializers, which enable you to create a collection and populate it with an initial set of values.

Constants and Enumerations
Discusses storing unchanging values for repeated use, including sets of related constant values.

Control Flow
Shows how to regulate the flow of your program's execution.

Data Types
Describes what kinds of data a programming element can hold and how that data is stored.

Declared Elements
Covers programming elements you can declare, their names and characteristics, and how the compiler resolves references to them.

Delegates
Provides an introduction to delegates and how they are used in Visual Basic.

Early and Late Binding
Describes binding, which is performed by the compiler when an object is assigned to an object variable, and the differences between early-bound and late-bound objects.

Error Types
Provides an overview of syntax errors, run-time errors, and logic errors.

Events
Shows how to declare and use events.

Interfaces
Describes what interfaces are and how you can use them in your applications.

LINQ
Provides links to topics that introduce Language-Integrated Query (LINQ) features and programming.

Objects and Classes
Provides an overview of objects and classes, how they are used, their relationships to each other, and the properties, methods, and events they expose.

Operators and Expressions
Describes the code elements that manipulate value-holding elements, how to use them efficiently, and how to combine them to yield new values.

Procedures
Describes Sub, Function, Property, and Operator procedures, as well as advanced topics such as recursive and overloaded procedures.

Statements
Describes declaration and executable statements.

Strings
Provides links to topics that describe the basic concepts about using strings in Visual Basic.

Variables
Introduces variables and describes how to use them in Visual Basic.

XML
Provides links to topics that describe how to use XML in Visual Basic.

Collections
Describes some of the types of collections that are provided by the .NET Framework. Demonstrates how to use simple collections and collections of key/value pairs.

Visual Basic Language Reference
Provides reference information on various aspects of Visual Basic programming.

Show: