Mid Collections

How can you remove all items from a Dictionary? Follow:

Use the Clear() method to remove all key-value pairs.

dictionary.Clear();

This resets the dictionary to an empty state.

📘 C# Queue<T> – Interview Questions &

More from C# Programming Tutorial

All questions for this course