语法 <test> ? <resultIfTrue> : <resultIfFalse>
示例
string resStr = (myInteger<10) ? "Less than 10":"Greater than or equal to 10";
131-三元运算符
原文:https://www.cnblogs.com/wuxiaohui1983/p/9969630.html