Answers for "A conditional expression cannot be used directly in a string interpolation because the ':' ends the interpolation. Parenthesize the conditional expression."

C#
1

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")}";
Posted by: Guest on January-28-2021

Code answers related to "A conditional expression cannot be used directly in a string interpolation because the ':' ends the interpolation. Parenthesize the conditional expression."

C# Answers by Framework

Browse Popular Code Answers by Language