Created
December 14, 2011 21:26
-
-
Save devoyster/1478614 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
// Here different expression keys should be generated since parameter "value" is different | |
// for two expressions at the moment of their creation | |
int value = 1; | |
Expression<Func<string, string>> expr1 = s => s.Length > value ? s.Substring(0, value) : s; | |
int value = 2; | |
Expression<Func<string, string>> expr2 = s => s.Length > value ? s.Substring(0, value) : s; | |
// Here same expression keys should be generated since parameter value (1) is the same | |
// for two expressions at the moment of their creation | |
int value = 1; | |
Expression<Func<string, string>> expr1 = s => s.Length > value ? s.Substring(0, value) : s; | |
Expression<Func<string, string>> expr2 = s => s.Length > 1 ? s.Substring(0, 1) : s; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment