This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Choose the best response for each of the following questions.
What is the primary characteristic of a HashSet<T> in C#?
HashSet<T>
It allows duplicate elements.
It stores elements as key/value pairs.
It ensures uniqueness of elements.
A banking application needs to store customer IDs with their associated account details for quick retrieval. Which collection should be used?
List<Account>
Dictionary<int, Account>
HashSet<Account>
Which of these collections in C# supports dynamic resizing and access to elements by index?
List<T>
Dictionary<TKey, TValue>
You must answer all questions before checking your work.
Was this page helpful?