Roadmap › 1. .NET › Step 8
VB

VB.NET — Visual Basic .NET from Basics to Advanced (with C# Comparison)

VB.NET syntax and program structure, data types and Option Strict/Explicit/Infer, operators and control flow, procedures (Sub vs Function, ByVal/ByRef, Optional, ParamArray), arrays and collections, classes and OOP keywords (Inherits, Implements, Overridable, MustInherit, Shadows), properties, modules and Shared members, events and delegates (WithEvents/Handles/AddHandler), error handling (Try/Catch and legacy On Error), LINQ and XML literals, async, WinForms and Web Forms code-behind, and converting VB.NET to C#.
What it is & where it is used

Visual Basic .NET is a .NET language that compiles to the same IL as C# and uses the same CLR, base class library, ASP.NET, ADO.NET and Entity Framework. Many enterprise and government systems (especially .NET Framework Web Forms and WinForms apps from 2002–2015) are written in VB.NET, so developers are often hired to maintain or migrate them.

VB.NETC#
Syntax styleEnglish-like keywords, line-oriented, End If/End SubC-style braces and semicolons
Case sensitivityCase-insensitiveCase-sensitive
TypeDim x As Integer = 5int x = 5;
Same runtime/IL✅✅
New language featuresStable since 2020 (no new major features)Evolving every year
Typical use todayMaintaining legacy apps, Office/VBA developers moving to .NETMost new development

Microsoft's position (2020): Visual Basic is supported on .NET 5+ for WinForms, WPF, console and class libraries, but will not get new language features and ASP.NET Core does not offer VB templates (Web Forms/MVC 5 on .NET Framework do).

Versions & history
VersionYearShipped withHighlights
VB 1.0–6.0 (classic)1991–1998Visual Studio 6COM-based, not .NET — VB6 apps are still migrated today
VB.NET 7.02002.NET Framework 1.0Full OOP, structured exception handling, .NET
VB 8.0 (2005)2005.NET 2.0Generics (Of T), My namespace, Using, operator overloading, partial classes, IsNot
VB 9.0 (2008)2007.NET 3.5LINQ, XML literals, Option Infer, lambdas, anonymous types, extension methods
VB 10 (2010)2010.NET 4.0Auto-implemented properties, multi-line lambdas, implicit line continuation, collection initializers
VB 11 (2012)2012.NET 4.5Async/Await, iterators (Iterator/Yield)
VB 14 (2015)2015RoslynNameOf, string interpolation $"...", ?. null-conditional, multiline strings, read-only auto-properties
VB 15–15.52017VS 2017Tuples, ByRef returns consumption, binary literals, digit separators
VB 16–16.92019–2020.NET Core 3 / .NET 5Comments after line continuation, init-only property consumption; final feature updates
Lifecycle

How a VB.NET project runs:

  1. Write .vb files (Visual Studio with VB project templates).
  2. The VB compiler (vbc, part of Roslyn) compiles them with project-level settings (Option Strict, Option Explicit, root namespace, imports) into IL in an assembly.
  3. The CLR loads and JIT-compiles it exactly like C# output; VB-specific helpers live in Microsoft.VisualBasic.dll (e.g. Left, Mid, CInt, My namespace).
  4. C# and VB projects in one solution reference each other freely — they share the CTS types.
Tools used to develop
  • Visual Studio (VB.NET project templates: Console, Class Library, WinForms, WPF; Web Forms/MVC on .NET Framework).
  • Converters: Telerik Code Converter (online), ICSharpCode CodeConverter (VB ↔ C#, Visual Studio extension), SharpDevelop's converter (legacy).
  • ILSpy can decompile an assembly to either language — useful to see the C# equivalent of VB code.
  • .NET Upgrade Assistant for migrating .NET Framework VB projects to modern .NET.