C# C# Objects Encapsulation and Arrays Ternary If

Don't i have the boolean?

It asks if I included the boolean, however i thought the (value < 0) was the boolean. Is there something I need to do?

CodeChallenge.cs
int value = -1;
string textColor = null;

(value < 0) ? textColor = "red" : textColor = "green";

1 Answer

Erik Gabor
Erik Gabor
4,251 Points

Definitely textColor gets the value "Red" :)) bool cond = ( value < 0 );