HybridDictionary hd = new HybridDictionary(); hd.Add("key1", "value1"); hd.Add("key2", "value2"); hd.Add("key3", "value3"); hd.Clear(); //removes all elements from the HybridDictionary object
HybridDictionary hd = new HybridDictionary(); hd.Clear(); //an empty HybridDictionary objectIn this example, we create a new, empty HybridDictionary object and call the Clear method on it. This has no effect because the HybridDictionary object is already empty. Package/Library: This method is part of the System.Collections.Specialized namespace, which is included in the .NET Framework Class Library.