Reputation: 2214
I need a way to delete the last element in an array when I don't know how big the array is.
Basically I need the VB version of php array_pop, but nothing relevant seems to be appearing in search results.
Upvotes: 5
Views: 18904
Reputation: 78185
VB6:
redim preserve arr(lbound(arr) to ubound(arr) - 1)
VB.NET:
redim preserve arr(arr.GetUpperBound(0) - 1)
Upvotes: 6