c# - What does the '?' character do in this operation? -


i'm reading through friends code , writing test harness it, , i've come across that's bugging me:

console.writeline(inputstring + (ispalindrome(inputstring) ? displayconditions(" text 1",  consolecolor.black) : displayconditions("some text 2", consolecolor.white))); 

what '?' symbol in operation?

a general description of what's being called appreciated. can't seem find answer online or in of books have.

this ternary operator.

x ? y : z should read as

if ( x )     y; else     z; 

Comments