I have been trying to 'transport' the first two elements from list A to list B without copying them.
At the start, list A has four int values. In the end I want List A and B to both have 2 int values.
I'm trying something like this:
int a = 1;
int b = 2;
int c = 3;
int d = 4;
TestA.Add(a);
TestA.Add(b);
TestA.Add(c);
TestA.Add(d);
for (int i=0; i<2; i++)
{
TestB.AddRange(TestA[i]);
}
I get a IEnummerable conversion error. I'm sure I'm doing it in a very naive way, and I'd appreciate some help here. Thanks.