Lesson 16 of 34 · Arrays & Lists
Quiz: C# Arrays, Lists and Dictionaries
You have learned how to keep many values together: fixed-size arrays, growing List<T> collections and lightning-fast Dictionary<TKey, TValue> lookups — and how foreach walks through all of them.
These questions focus on the details that cause real bugs: off-by-one indexes, Length versus Count, shared references and changing a collection while looping over it. Get them right and the Grand Mimic's treasure awaits.
What this quiz covers
The questions check what you learned in the Arrays & Lists chapter of Learn C#. Not sure about a topic? Review its lesson first:
- C# Arrays and the foreach Loop
Learn C# arrays: declaring, indexing, Length, ranges and Array methods — and iterate over them with the foreach loop. Practise with an interactive exercise.
- C# List<T>: Resizable Lists
Use C# List<T> to store a growing collection: Add, Insert, Remove, Contains, IndexOf, Count and Sort — and avoid modifying a list inside foreach.
- C# Dictionary<TKey, TValue>
Store key-value pairs with C# Dictionary<TKey, TValue>: add, look up, TryGetValue, ContainsKey, Remove, iterate with foreach and count things fast.
Keep learning
Need a quick reminder? The C# cheat sheet has every topic of Learn C# on one page.
Lesson last updated on .