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

VB Equivalent to Java ArrayList

The nearly exact VB (or C#) equivalent to Java's ArrayList collection is the .NET System.Collections.Generic.List collection.

Java VB
void ArrayLists()
{
    java.util.ArrayList<Integer> myList = new java.util.ArrayList<Integer>();
    myList.add(1);
    myList.add(1, 2);
    int i = 1;
    myList.set(0, i);
    i = myList.get(0);
}
Imports System.Collections.Generic

Sub ArrayLists()
    Dim myList As New List(Of Integer?)()
    myList.Add(1)
    myList.Insert(1, 2)
    Dim i As Integer = 1
    myList(0) = i
    i = myList(0)
End Sub


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.