AnatomyOf

Anatomy of a VB.NET file

example.vb
1' A minimal VB.NET script -- yes, it really does need End Module
2Imports System
3
4Module Program
5 Const Greeting As String = "Hello from VB.NET, still verbose after all these years"
6
7 Sub Main(args As String())
8 For i As Integer = 1 To 3
9 If i Mod 2 = 0 Then
10 Console.WriteLine($"{Greeting} ({i})")
11 End If
12 Next
13 End Sub
14End Module
VB.NET is a modern, object-oriented programming language in the .NET family, known for its readable, English-like syntax.