csharp ternary operator
Code Example - csharp ternary operator
is this condition true ? yes : no
csharp if statement one line
someValue = condition ? newValue : someValue;
csharp inline if
(condition ? [true value] : [false value])
int x = a ? b : c;
one line condition csharp
((a != null) ? (Action)(() => { b = a; }) : () => { /*Do something else*/ })();
ternary operator in csharp
ternary
ternary operator csharp
conditional-expression:
conditional-or-expression
conditional-or-expression ? expression : expression