Created
August 20, 2013 16:23
Command-Query Violation
This file contains hidden or 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
class SomeClass{ | |
private int reason; | |
public bool Go(){ | |
int value = SomeBigCalculation(); | |
if( value > 5 ){ | |
this.reason = "Too Big"; | |
return true; | |
} | |
return false; | |
} | |
} |
This file contains hidden or 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
class SomeClass{ | |
private int reason; | |
public bool IsTooBig(){ | |
int value = SomeBigCalculation(); | |
return value > 5; | |
} | |
public void SetReason(){ | |
this.reason = "Too Big"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment