Generated GetHashCode not safe from OverflowException

Recently I've been in the habit of setting "Check for arithmetic overflow/underflow" on for c# projects. This is when I noticed that the implementation of GetHashCode generated by Resharper is not really safe - it will often result in an overflow and therefore throw an exception.

I think Resharper needs to do a better job of generating the code so as to avoid this type of thing.

What do you think? Should this be added as a change request?


Comment actions Permalink


We appreciate your feedback. The corresponding JIRA request has been created,
and you are welcome to monitor its status at

You may want to check our request tracking policy here:

Best regards,
- Development Team.

Comment actions Permalink

Cool, thanks for adding to issue tracker


Please sign in to leave a comment.