Anupam- / dapper-dot-net

Automatically exported from code.google.com/p/dapper-dot-net
Other
0 stars 0 forks source link

Identity constructor GetHashCode throw Arithmetic Overflow exception #8

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Running simple select code for dynamic object.
2. Code throws an exception of  Arithmetic Overflow
3.

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?

Please provide any additional information below.
Fixed by changing code 
hashCode = unchecked(hashCode * 23 + (sql == null ? 0 : sql.GetHashCode()));
                hashCode = unchecked(hashCode * 23 + (type == null ? 0 : type.GetHashCode()));
                hashCode = unchecked(hashCode * 23 + (connectionString == null ? 0 : connectionString.GetHashCode()));

Original issue reported on code.google.com by gauravsa...@gmail.com on 22 Apr 2011 at 10:09

GoogleCodeExporter commented 9 years ago
Fixed; hash-code region marked unchecked

Original comment by marc.gravell on 22 Apr 2011 at 12:05