protected virtual int GetHash(Object Key);
Exception: This method will give NullReferenceException if the key is null.
Below programs illustrate the use of above-discussed method:
1002 : Deshmuk Narayan 1002 : 985757554 1001 : Parek Shetty 1001 : -1708895167 1003 : Ratan Kaalikaran 1003 : -1892225314
- Getting the hash code of the ValueTuple in C#
- C# | Check if a Hashtable is equal to another Hashtable
- Managed code and Unmanaged code in .NET
- C# | Get or Set the value associated with specified key in Hashtable
- C# Hashtable with Examples
- C# | Hashtable Class
- Difference between Hashtable and Dictionary in C#
- C# | Check whether a Hashtable contains a specific key or not
- C# | Remove the element with the specified key from the Hashtable
- C# | Get an enumerator that iterates through the Hashtable
- C# | Remove all elements from the Hashtable
- C# | Gets an ICollection containing the values in the Hashtable
- C# | Check if the Hashtable contains a specific Key
- C# | Adding an element into the Hashtable
- C# | Check if Hashtable is read-only
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.