The assignment operators and the tertiary operator 賦值運算符和三元運算符(
Takes three operands and is the sole tertiary operator in c 接受三個操作數(shù),是c #中唯一的三元運算符。
Although c ( where this operator originated ) prides itself on being a terse language , and the ternary operator might have been introduced partly for efficiency , you should be somewhat wary of using it on an everyday basis ? it ' s easy to produce unreadable code 盡管c引以為傲的就是它是一種簡練的語言,而且三元運算符的引入多半就是為了體現(xiàn)這種高效率的編程,但假若您打算頻繁用它,還是要先多作一些思量? ?它很容易就會產(chǎn)生可讀性極差的代碼。