Language basics
29 steps in 10 sets of Visual Basic.
Visual Basic taught more people to program than almost any language in history, and its modern .NET form keeps the quality that did it: code you can read aloud. Blocks end with words instead of braces — End If, End Sub, Next — keywords are ordinary English, and the punctuation budget goes to a handful of characters that earn their place. Under Option Strict it is a fully typed, compiled .NET language sharing the same runtime and libraries as C#, and it still runs an enormous share of the world's line-of-business software.
This tour covers the language itself: variables and interpolated strings, the core collections, Select Case, and the LINQ queries that VB renders more like SQL than any other language. Then Subs, Functions and lambdas, classes and interfaces, value types, and the idioms VB is known for — With blocks, named arguments, events. Files, exceptions and JSON close it out. Every seed compiles under Option Strict On before it reaches you.
Variables & strings
- Dim and interpolationDim, type inference and the $-string that formats most VB output.
- String methodsTrim, Replace, Split and friends on an ordinary sentence.
- StringBuilder and FormatBuilding aligned console output without a thousand concatenations.
Collections
- ArraysLiterals, 2-D grids and ReDim Preserve, VB's in-place resize.
- List(Of T)The growable collection: add, insert, remove, sort.
- DictionariesKey-value stores with TryGetValue, the lookup that cannot throw.
Control flow
- If and ElseIfBlock Ifs, one-line Ifs and the If() operator that picks a value.
- Select CaseOne value against many shapes of branch: lists, ranges, comparisons.
- LoopsFor, Step, Do While and Do Until — every loop VB owns.
LINQ
- LINQ queriesFrom, Where and Order By: SQL-shaped queries over any collection.
- LINQ method syntaxThe same pipeline as lambdas: Where, Select, Count, Average.
- Group By and AggregateBucketing values and folding a whole sequence in one query.
Subs & functions
- Subs and FunctionsThe two callables: Functions return, Subs act.
- Optional and named argumentsDefaults, sugar:=True call sites and ParamArray catch-alls.
- LambdasFunction() and Sub() expressions, one line or a full block.
Classes & interfaces
- Classes and propertiesAuto-properties, Sub New and a ToString the console respects.
- InheritanceInherits, Overridable and MyBase in a two-class hierarchy.
- Interfaces and ImplementsA contract, and the Implements clause that names its promise.
Value types
- StructuresValue types: copied on assignment, methods and all.
- EnumsNamed constants, their integers, and [Enum] with brackets.
- Generics and tuples(Of T) type parameters, constraints and named tuple fields.
VB idioms
- With blocksOne object, many touches: the block that drops the repetition.
- Nothing and NullableNothing checks, ?. chains and If() — VB's null-safety kit.
- EventsEvent, RaiseEvent and the AddHandler wiring in one kettle.
Files & errors
- FilesWrite, append, stream and delete through System.IO.
- ExceptionsTry, a filtered Catch, Finally and a custom error of your own.
- JSONSystem.Text.Json round trips for a class and a plain array.
Encore
- Grade reportA complete program: query a dictionary, rank by average, letter it.
- Inventory reorderA complete program: filter low stock, price the order, total it.