Just copy every element from list1 to list2. There might be a better way, but this will definitely work.
Code:list2.Clear(); for(int i=0;i<list1.Count;++i) { list2.Add(list1.Item(i)); }
| CodeGuru Home | VC++ / MFC / C++ | .NET / C# | Visual Basic | VB Forums | Developer.com |
|
Results 1 to 7 of 7
Thread: How to copy a list to another?Threaded View
|
Click Here to Expand Forum to Full Width |