What are the key differences between Dictionary.Clear and new Dictionary() in C#? Which one is recommended for which cases?
Dictionary.Clear()
This will remove all key/value pairs within the Dictionary. The Garbage Collector will clear the memory for these items during the next Garbage Collection Cycle. MSDN
new Dictionary()
Creates a new Dictionary object in memory and abandons the original object. The memory would be cleared during the next Garbage Collection Cycle.