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

VB Equivalent to C++ Indexers

C++ VB
public:
int &operator [](int index)
{
    return field[index];
}

*for a read-only indexer, return an int instead of an int reference (remove the '&').
Default Public Property Item(ByVal index As Integer) As Integer
    Get
        Return field(index)
    End Get
    Set
        field(index) = Value
    End Set
End Property


Use C++ to VB Converter to convert from C++ to VB.     

Additional resource: VB.NET and C++ Equivalents


Copyright © 1997 – 2018 Tangible Software Solutions Inc.