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#
- Getting the Hash Code of the Given Index in C#
- Getting the Hash Code of the Specified Range 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 Class
- C# Hashtable with Examples
- C# | Get an enumerator that iterates through the Hashtable
- C# | Check whether a Hashtable contains a specific key or not
- Difference between Hashtable and Dictionary in C#
- C# | Check if Hashtable is read-only
- C# | Check if the Hashtable contains a specific Key
- C# | Adding an element into the Hashtable
- C# | Gets an ICollection containing the keys in 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 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.