CS-Script 3.20.0

VB.NET scripts

Among other programming languages CS-Script supports VB.NET.

This was arguably the most requested feturure after CS-Script was released. It is no surprise considering how big VB developers comunity.

The VB script compiler is implemented as a pluggable custom compiler assembly (see Alternative compilers), which is deployed and enabled at the time of the CS-Script installation/upgrade.

The script code below is an example of the complete VB.NET script Hello.vb from the Implementing non-C# compilers tutorial.

' //css_reference "System.dll";
' //css_reference "System.Windows.Forms.dll";
Imports System
Imports System.Windows.Forms

Module Module1
    Sub Main()
        Console.WriteLine("Hello World! (VB)")
        MessageBox.Show("Hello World! (VB)")
    End Sub
End Module
Note: System.dll and System.Windows.Forms.dll are referenced with //css_reference statement directly from the code. Because automatic assembly loading is not available for non-C# scripts (see Alternative Compilers for limitation details). 

See Also

Alternative compilers | Implementing non-C# compilers