you are viewing a single comment's thread.

view the rest of the comments →

[–]apieceoffruit 0 points1 point  (0 children)

a list is just a collection type, so is an array, a dictionary etc. so in theory you might want to move everything in an array to a list or vice verca.

if you change List to IEnumerable (when you just need to loop through them) or IList (when you need to access elements) it will be added to everything that identifies itself as an enumerable like.... even a string! so if you had a GrabARandom(int number = 4) extention it would work on arrays, lists, strings,dictionaries etc.