public static string ToYesNo(this bool boo, bool value, TextNotation notation) { switch (notation) { case TextNotation.Camal: case TextNotation.Lower: case TextNotation.UnderScoreLower: return value ? "yes" : "no"; case TextNotation.Pascal: case TextNotation.UnderscorePascal: return value ? "Yes" : "No"; case TextNotation.Upper: case TextNotation.UnderScoreUpper: return value ? "YES" : "NO"; } throw new Exception("Notation not handled"); }
public static string ToYesNo(this bool boo, bool value, TextNotation notation) { switch (notation) { case TextNotation.Camal: case TextNotation.Lower: case TextNotation.UnderScoreLower: return(value ? "yes" : "no"); case TextNotation.Pascal: case TextNotation.UnderscorePascal: return(value ? "Yes" : "No"); case TextNotation.Upper: case TextNotation.UnderScoreUpper: return(value ? "YES" : "NO"); } throw new Exception("Notation not handled"); }