Using GetHashCode for getting Enum int value
Using GetHashCode() is incorrect. You should cast to int. Using it the way you do is asking for raptors(or Raymond) to come and eat you. That GetHashCode() happens to return the integer value of the enum is an implementation detail and may change in future versions of .net. GetHashCode() guarantees that if two values are … Read more