decimal.GetHashCode() delivers different hash codes depending on number of decimal places - by Axel Eckenberger

Status : 

  Won't Fix<br /><br />
		Due to several factors the product team decided to focus its efforts on other items.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 776203 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 1/10/2013 1:32:02 AM
Access Restriction Public


The method GetHashCode of the decimal value type returns differen hash codes depending on the number left to the decimal point. The error occurrs only when specifying decimal digits up to the allowable maximum for the given value.

The bug causes a problem when using decimals ask key for dictionaries or in the calculation of a combined hash key.

The problem exists in the .Net Framworks 2 - 4.5.
Sign in to post a comment.
Posted by Microsoft on 1/10/2013 at 9:24 PM
Thanks for your feedback.

We are rerouting this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.
Posted by Microsoft on 1/10/2013 at 1:55 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(