Hi I'm trying to append 1 list to another. I've done it using AddRange()
before but it doesn't seem to be working here... Here's the code:
IList<E> resultCollection = ((IRepository<E, C>)this).SelectAll(columnName, maxId - startId + 1, startId);
IList<E> resultCollection2 = ((IRepository<E, C>)this).SelectAll(columnName, endId - minId + 1, minId);
resultCollection.ToList().AddRange(resultCollection2);
I did debugging to check the results, here's what I got: resultCollection
has a count of 4 resultCollection2
has a count of 6, and after adding the range, resultCollection
still only has a count of 4, when it should have a count of 10.
Can anyone see what I'm doing wrong? Any help is appreciated.
Thanks,
Matt