• Saves Valuable Time
  • Trusted Accuracy for 12 Years
  • 15-Day Money-Back Guarantee

VB Equivalent to Java Static Initializers

The VB equivalent to a Java static initializer block is a shared constructor.

Java VB
class Foo
{
    public static int field;

    static
    {
        field = 1;
    }
}
Class Foo
    Public Shared field As Integer

    Shared Sub New()
        field = 1
    End Sub
End Class


Use Java to VB Converter to convert from Java to VB.     

Additional resource: VB.NET and Java Equivalents


Copyright © 1997 – 2017 Tangible Software Solutions Inc.