App | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

App

Is it useful? I still don't get Arrays

6th Jul 2017, 4:38 PM
Kasengemena Musonda
Kasengemena Musonda - avatar
2 Answers
+ 3
Erm, list's in System.Collections are just objects that use arrays internally. Arrays are not history. You don't need to use lists for simply holding multiple variables. Lists just bring some advantages, such as adding elements to a filled array. The List class uses a private array of generic type. That is no different than creating a class and creating a global non-static private array. https://referencesource.microsoft.com/#mscorlib/system/collections/generic/list.cs You can make your own List. Here's one I made: (The List is called Inventory. It's only a bit different since I didn't use generics) https://code.sololearn.com/cbtL200Up5bz/?ref=app (It's not that optimized though). PS: A linked list on the other hand does not need to use an array.
6th Jul 2017, 7:09 PM
Rrestoring faith
Rrestoring faith - avatar
0
Since there are lists and collections arrays are history. They still work though but are less advanced and do have their constraints.(notice your title is not descriptive)
6th Jul 2017, 5:20 PM
sneeze
sneeze - avatar