Skip to content

Operators

Ternary conditional operator

One-line if statement

Eksempel:

c#
int temperature = 25;
string text = temperature > 20 ? "Warm" : "Cold";