문법

variable = (condition) ? expressionTrue :  expressionFalse;

 

예제

int time = 20;
string result = (time < 18) ? "Good day." : "Good evening.";
Console.WriteLine(result);

결과 : 
Good evening.

+ Recent posts