Created
January 27, 2015 09:19
-
-
Save ViIvanov/645771158e856e259331 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
void Method(Entity entity) { | |
if(entity == null) { | |
throw new ArgumentNullException(nameof(entity)); | |
} else if(entity.Some.Property > 0) { | |
throw new ArgumentException(stringanize(entity.Some.Property > 0), nameof(entity)); | |
}//if | |
// "stringanize" makes a string from an expression | |
// and when we are renamed "Some" or "Property" | |
// string is updated! | |
// … | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment