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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top