C# a == b ? c :d 表示的意思 a==b 为true,这个表达式返回c; a==b为false,这个表达式返回d. 相当于: if(a == b) { return c; } else { return d; }