mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-09-01 02:42:12 +02:00
Put demonstrative condition into ternary expression
It should be made clear that the part before the ternary operator is indeed a condition, most often created as some comparison expression.
This commit is contained in:
committed by
G. Reiter
parent
38b9bf7eed
commit
b1984042c8
@@ -234,7 +234,8 @@ on a new line! ""Wow!"", the masses cried";
|
||||
// Üçlü operatörler
|
||||
// Basit bir if/else ifadesi şöyle yazılabilir
|
||||
// <koşul> ? <true> : <false>
|
||||
string isTrue = (true) ? "True" : "False";
|
||||
int toCompare = 17;
|
||||
string isTrue = toCompare == 17 ? "True" : "False";
|
||||
|
||||
// While döngüsü
|
||||
int fooWhile = 0;
|
||||
|
Reference in New Issue
Block a user