If there any short way besides foreach loop and new collection creation to add object after specific object in existing List ?
Just an example:
"amy","jerry","tony","amy","jack". I want to add "simon" after each "amy" in short way
If you know where you want to enter an item, you can do
List.Insert(position, item)
See List.Insert()
on MSDN
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With