Created
January 31, 2012 14:10
-
-
Save AlexZeitler/1710679 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Test] | |
public void CanHasHash1() { | |
var hash1 = "123".GetHashCode(); | |
var hash2 = "234".GetHashCode(); | |
var actual = (hash1 - hash2); | |
Assert.AreEqual(actual, 1566083913); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Solution http://stackoverflow.com/questions/53086/can-i-depend-on-the-values-of-gethashcode-to-be-consistent