You can test 2 conditions and have 2 possible results with that:
string mystring = textbox1.Text == "" && some_bool == true ? "X" : "O";
In that case
mystring
will be "X" if both conditions are met and "0" otherwise (1 or no condition met)
Or you can do 2 test and have 3 results like this:
string mystring = textbox1.Text == "" ? "X" : some_bool ? "*" : "0";
In that case
mystring
will be "X" if the string is empty. Otherwise, it will be "*" if
some_bool
is true and "O" if not.
EDIT:
In C++, it would be possible to set 2 values using comma operator but this is not valid in C#. Anyway, such construct are not recommended as it make the code less maintainable.
bool some_bool = false;
String ^mystring = textbox1.Text == String::Empty ? (some_bool = true, "X") : "O";
If the string is empty, then both
mystring
and
some_bool
would get updated. This does not compile in C#
(even after removing the ^).
Your question is not clear...