The ?: Operator is a "conditional operator".
boolValue==true ? "true": "false" boolValue==true ? "true": "false" is therefore a conditional expression.
myString = (boolValue==true ? "true": "false") is a conditional expression that also has a job.
string myString = (boolValue==true ? "true": "false"); is an operator that uses a conditional expression in a declaration and assignment.
?: often called a "triple operator". Strictly this is only a ternary operator, but since it is unique in these languages, the appeal to the ternary operator is true, although it uses a label based on a fact separate for its own internal definition. If we add an operator to a language of type x Β§ y ΒΆ z , which took all three of x , y and z as operands, then it would also be a ternary operator, and the conditional operator would still be a ternary operator, it would no longer be ternary the operator.
source share