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 Specified Range in C#
- Getting the hash code of the ValueTuple in C#
- Getting the Hash Code of the Given Index 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
- Difference between Hashtable and Dictionary in C#
- C# | Check if the Hashtable contains a specific Key
- C# | Check if the Hashtable contains a specific Value
- C# | Remove all elements from the Hashtable
- C# | Remove the element with the specified key from the Hashtable
- C# | Adding an element into the Hashtable
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.