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
- C# | Gets an ICollection containing the keys in the Hashtable
- C# | Gets an ICollection containing the values in the Hashtable
- C# | Remove all elements from the Hashtable
- C# | Remove the element with the specified key from the Hashtable
- Difference between Hashtable and Dictionary in C#
- C# | Adding an element into the Hashtable
- C# | Get an enumerator that iterates through the Hashtable
- C# | Check whether a Hashtable contains a specific key or not
- C# | Check if the Hashtable contains a specific Key
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. 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.