Enum.GetHashCode Method is used to get the HashCode for the value of the current instance. This method is inherited from the Object class.
public override int GetHashCode ();
Returns: This method returns the 32-bit signed integer hash code.
HashCode of Enum Constant Blue : 0 Hashcode of Enum Constant Black : 1
- How to get the typecode for enum in C#?
- C# | Enumeration (or enum)
- How to compare Enum values in C#?
- C# | How to get the HashCode for the string
- C# | How to get the HashCode of the tuple?
- Range Structure in C# 8.0
- Basics Operations of File and Directory in C#
- Check if the given ranges are equal or not in C#
- How to Create a Range to a Specified End in C#?
- How to Create a Range From a Specified Start in C#?
- Getting the Hash Code of the Specified Range in C#
- Range Constructor in C#
- Finding the Start Index of the Specified Range in C#
- Finding the End Index of the Specified Range in C#
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.