How to modify an item in BaseCollection

  • Thread starter Thread starter TF
  • Start date Start date
T

TF

Hi,
I've created a collection of "MyStruct" using CollectionBase. It works
fine but i can't modify any property of an item of collection because
InnerList and List give me a readonly value.
How can i modify an existing item of this collection?

Thanks
TF
 
Depends what do you have in the list. If you inherited your class from
CollectionBase then you can use
this.InnerList.Add to Add list items, to modify you can instantiate an
object of the Lists item and play with that.
 
Back
Top