I have an enum
public enum INFLOW_SEARCH_ON { ON_ENTITY_HANDLE = 0, ON_LABEL = 1, ON_NODE_HANDLE = 2 } // enum I
Others have said why casting to int is better.
Another reason to not use GetHashCode is performance. It causes boxing. In my quick tests, GetHashCode was about 50 times slower (if it matters).
GetHashCode