I am working on a game in which I have to check some ImageViews' left position.
Since ImageViews are constantly added and removed from the game (So I don't know ahead all of the views), and not all ImageViews need to be processed, I figured out the best way of doing so will be using arrays.
The problem is - I don't know how to add or remove from an array, so I would appreciate some help in here.
Related to this question, suppose I declare the following:
Type Element(A As Boolean,B as int)
Dim SomeElements(10) as array
SomeElements(0).A = True : SomeElements(0).B = 1
.
.
.
SomeElements(10).A = True : SomeElements(0).B = 10
And I want to REMOVE SomeElements(10) for example
If I convert to List then I will not be able to Set Elements just like before or use Extra Array to copy content!
So how can I Remove from Arrays without converting to List? :sign0085:
You can set any element in the list. It is a bit more cumbersome.
If you want to remove an element and change the index of all the elements after this element, then you will need to copy the array elements with indices larger than the deleted element to the correct index.