Top 1,000 Features Creators Resources Extensions Blog Explorer CSV Download
GitHub icon

Visual Basic .NET

< >

Visual Basic .NET is a programming language created in 2001.

#85on PLDB 23Years Old 935kRepos

Visual Basic .NET (VB.NET) is a multi-paradigm, object-oriented programming language, implemented on the .NET Framework. Microsoft launched VB.NET in 2002 as the successor to its original Visual Basic language. Although the ".NET" portion of the name was dropped in 2005, this article uses "Visual Basic [.NET]" to refer to all Visual Basic languages released since 2002, in order to distinguish between them and the classic Visual Basic. Read more on Wikipedia...

Example from the web:
Imports System.Console Module Program Sub Main() Dim rows As Integer ' Input validation. Do Until Integer.TryParse(ReadLine("Enter a value for how many rows to be displayed: " & vbcrlf), rows) AndAlso rows >= 1 WriteLine("Allowed range is 1 and {0}", Integer.MaxValue) Loop ' Output of Floyd's Triangle Dim current As Integer = 1 Dim row As Integer Dim column As Integer For row = 1 To rows For column = 1 To row Write("{0,-2} ", current) current += 1 Next WriteLine() Next End Sub ''' <summary> ''' Like Console.ReadLine but takes a prompt string. ''' </summary> Function ReadLine(Optional prompt As String = Nothing) As String If prompt IsNot Nothing Then Write(prompt) End If Return Console.ReadLine() End Function End Module
Example from Linguist:
Module Module1 Sub Main() Console.Out.WriteLine("Hello, I am a little sample application to test GitHub's Linguist module.") Console.Out.WriteLine("I also include a Razor MVC file just to prove it handles cshtml files now.") End Sub End Module
Example from Wikipedia:
System.WindowsApplication1.Forms.Form2.text = " MainForm "
Visual Basic .NET Keywords
AddHandler AddressOf Alias And AndAlso As Boolean ByRef Byte ByVal Call Case Catch CBool CByte CChar CDate CDbl CDec Char CInt Class Class CLng CObj Const Continue CSByte CShort CSng CStr CType CUInt CULng CUShort Date Decimal Declare Default Delegate Dim DirectCast Do Double Each Else ElseIf End End EndIf Enum Erase Error Event Exit False Finally For For Friend Function Get GetType GetXMLNamespace Global GoSub GoTo Handles If Implements Implements Imports In Inherits Integer Interface Is IsNot Let Lib Like Long Loop Me Mod Module Module MustInherit MustOverride MyBase MyClass Namespace Narrowing New New Operator Next Not Nothing NotInheritable NotOverridable Object Of On Operator Option Optional Or OrElse Out Overloads Overridable Overrides ParamArray Partial Private Property Protected Public RaiseEvent ReadOnly ReDim REM RemoveHandler Resume Return SByte Select Set Shadows Shared Short Single Static Step Stop String Structure Structure Sub SyncLock Then Throw To True Try TryCast TypeOf UInteger ULong UShort Using Variant Wend When While Widening With WithEvents WriteOnly Xor #Const #Else #ElseIf #End #If = & &= * *= / /= \ \= ^ ^= + += - -= >> >>= << <<=

Language features

Feature Supported Token Example
Booleans True False
Case Insensitive Identifiers
' A comment
Line Comments '
' A comment
Operator Overloading
Semantic Indentation X

View source

- Build the next great programming language · About · Acknowledgements · Published by Breck's Lab