I know that the main difference between an array and a list is that a list size changes dynamically as items are added or removed. Because of this, if we copy an array to a list does that mean that the list must have a static size of the array's capacity?
iConqueror
27
Junior Poster
Recommended Answers
Jump to PostAll you need to do is pass the array as a parameter in the List's new constructor or use the
ToList()
method and assign it to the list:long[] test = new long[20]; List<long> testlist1 = new List<long>(test); List<long> testlist2 = test.ToList();
Once the list …
All 3 Replies
tinstaafl
1,176
Posting Maven
iConqueror
commented:
Cheers
+2
iConqueror
27
Junior Poster
deceptikon
1,790
Code Sniper
Team Colleague
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.