Skip to content
Hello, VB.Net
step 1/5

Reading — step 1 of 5

Learn

~1 min readBasics

VB.Net was released in 2002 as Microsoft's modernization of Visual Basic 6 onto the .NET runtime. It compiles to the same IL as C# and uses the same standard library — the difference is syntax style (English-like vs. C-family).

Module Program
    Sub Main()
        Console.WriteLine("Hello, VB.Net!")
    End Sub
End Module
  • Module Name ... End Module — a static container for code
  • Sub Main() — entry point. Sub (subroutine) returns nothing; Function returns a value
  • Statements end with newlines, NOT semicolons. Continuation: _ at end of line
  • Everything is case-insensitiveconsole.writeline works the same
  • Comments: ' (single quote) for line
  • Strings use "" only (no 'string')

Reading stdin: Console.ReadLine() returns a string. Convert with Integer.Parse(s), Double.Parse(s), or CInt(s).

Discussion

Ask a question, share an insight, or help someone who’s stuck.

Sign in to post a comment or reply.

Loading…