Quiz Yourself: Collections
Evaluate your understanding of .NET collection types including lists, FIFO structures, and observable data patterns.
We'll cover the following...
We'll cover the following...
Technical Quiz
1.
How do the Add and TryAdd methods behave differently when attempting to insert a key that already exists in the dictionary?
A.
Add overwrites the existing value, while TryAdd ignores the new value.
B.
Both methods overwrite the existing value without throwing exceptions.
C.
Add throws an exception, while TryAdd returns false safely.
D.
Both methods throw an ArgumentException to enforce uniqueness.
1 / 14