diff options
author | ven <vendethiel@hotmail.fr> | 2015-10-04 20:25:55 +0200 |
---|---|---|
committer | ven <vendethiel@hotmail.fr> | 2015-10-04 20:25:55 +0200 |
commit | 8d3d000c636a32554d505007cb8128852075ca3f (patch) | |
tree | 1e5f42d84fe8b08d2020f5153abbf8cf483bbe9a | |
parent | 9b46fe7e57bcf63785b67cdaffc49ff0d47d7476 (diff) | |
parent | f1a90a4e636616ce91a271504eee3f374bfd7094 (diff) |
Merge pull request #1339 from guntbert/iss1333
[csharp/en] Put demonstrative condition into ternary expression
-rw-r--r-- | csharp.html.markdown | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/csharp.html.markdown b/csharp.html.markdown index 479b7f01..222ba0d2 100644 --- a/csharp.html.markdown +++ b/csharp.html.markdown @@ -236,7 +236,8 @@ on a new line! ""Wow!"", the masses cried"; // Ternary operators // A simple if/else can be written as follows // <condition> ? <true> : <false> - string isTrue = (true) ? "True" : "False"; + int toCompare = 17; + string isTrue = toCompare == 17 ? "True" : "False"; // While loop int fooWhile = 0; |