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?
Jump to Post
All 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; List<long> testlist1 = new List<long>(test); List<long> testlist2 = test.ToList();
Once the list …
All 3 Replies
We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.