Quantcast
Channel: Answers by "AyAMrau"
Viewing all articles
Browse latest Browse all 91

Answer by AyAMrau

$
0
0
When using List(t).Insert(int index, T item), the first argument is supposed to be an index to insert the element at, but it has to fit within the current size of the list. The value you use must be greater or equal to 0 AND less or equal to List.Count. Therefore your item ids may not fit this requirement. You can use List.Add, then the new element will always end up at the end of the list and it will resize appropriately. If that is for some reason not suitable, you may need to give more details of what do you want to achieve.

Viewing all articles
Browse latest Browse all 91

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>