Description: The Clear method of the System.Collections.Hashtable class is used to remove all the elements from the hashtable.
Code Example:
Hashtable myHashtable = new Hashtable(); myHashtable.Add("key1", "value1"); myHashtable.Add("key2", "value2");
myHashtable.Clear();
Package Library: This method is a part of the System.Collections package in the .NET Core Library.
C# (CSharp) System.Collections.Hashtable.Clear - 35 examples found. These are the top rated real world C# (CSharp) examples of System.Collections.Hashtable.Clear extracted from open source projects. You can rate examples to help us improve the quality of examples.