c# string ternary operator string interpolation code example
Example: A conditional expression cannot be used directly in a string interpolation because the ':' ends the interpolation. Parenthesize the conditional expression.
var result = $"Descending {(isDescending ? "yes" : "no")}";