How can i identify specific item in collection


To code “Item(2).ToString” was invalid but how can i identify third item in collection?


What type of collection you are using? Can you elaborate


Thanks for comment.
I’m using a type “System.Collection.Generic.ICollection<System.Dtring>”


for such type of collection you can use this, standalone or in a loop -


Hope this helps !


Thanks, I could understand how to output these items, but actually want to identify and output only “value2” like item(1).ToString.
Can I only output specified item in “Collection”?


of course in for each loop you can have a if condition what matches to your requirement so you will be getting filtered data then


Just use ‘item(1)’ instead of ‘item(1).ToString’. Since it’s a collection of String no need to add .ToString


It was my easy miss-understanding.
I should code collection(1).ToString but did like
Sorry for bothering you guys…


No problem @ryoryo, I hope that solved your problem