Please enable JavaScript.
Coggle requires JavaScript to display documents.
C# Collections (list (OrderBy( lambda function), .FindIndex(Predicate);, …
C# Collections
list
.FindIndex(Predicate);
.Insert(Index, Item);
List<T>.Count
enumerate with foreach
.Add( );
List<T>
.RemoveAt(Index);
.RemoveAll();
.Take(int);
OrderBy( lambda function)
definition of array
fixed number of items
specific order
e.g. days of the week
square brackets after a type
can define array size within []:
e.g. string[6]
Array.Length
dictionaries
Dictionary<TKey, TValue>
.Add(Key, Value);
.Keys
.Values
Keys are unique
KeyNotFoundException
Remove();
iterating an array
foreach loop
removing items while looping = work from end of array
foreach = readonly
zero-based indexing
item access via square bracket notation
cannot enumerate null
NullReferenceException
for loop
LINQ
readonly
! = not