Like C#, VB.NET compiles to MSIL which needs to be JITtedted as it is executed. The MSIL produced by VB.NET is identical to that produced by C#, which is why C# and VB.NET (and Managed C++ for that matter) can communicate directly with one another. Though the MSIL is identical between languages, C# has some features that VB.NET lacks, and vice versa. For example, VB.NET supports late binding, where the type of an object (or variable) can be determined at run-time.
Table of contents |
2 Controversy concerning VB.NET 3 External Links |
Visual Basic starting from version 1 through version 6, and now in the version called .NET, got more complex, albeit more powerful, with each revision. The following simple example gives an idea
Classic VB example:
A VB.NET example:
Changes
Private Sub Command1_Click()
MsgBox "Hello, World"
End Sub
Private Sub button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button1.Click
MessageBox.Show("Hello, World")
End Sub
There is extensive documentation that covers changes in the syntax (rules of the language), the changes in debugging applications, deployment and terminology.MessageBox.Show("Hello, World")
can be written as MsgBox("Hello, World")
. (Note that all parameters to procedure calls must now be surrounded by brackets.)