I have this:
MyUniversalClass ourtempclass = new MyUniversalClass();
List<MyUniversalClass> mylist = new List<MyUniversalClass>();
ourtempclass.ID = i;
ourtempclass.DisplayName = con.DisplayName;
ourtempclass.PhoneNumber = con.PhoneNumbers.First().PhoneNumber;
mylist.Add(ourtempclass);
but i want to be able to do something like this: (it doesnt compile)
mylist[3].Add(ourtempclass);
so that i add (ourtempclass) to the third (4th if you include 0) item of mylist, instead of it adding it to the first, second, and third, therefore replacing everything i had previously.
You can use insert method to insert at a particular location of list
so instead of
mylist[3].Add(ourtempclass);do
mylist.Insert(3, ourtempclass);