I have a VB.NET collection and I need to update an item in it. The collection contains an object item defined such as oFile(8). However, when I add a loFileItem entry in the oFile collection, I only have loFileItem(1) to loFileItem(7) defined. Then, later down the code, I can initialize loFileItem(8). However, that item is already present in the collection. I then need a way to update that item in the collection.
I tried:
oFile.Item(1)=loFileItem
However, it says that the Item property is read only.
How can I do this?