title: C# interpolated string with conditional-operator
body: <p>I tried to use the conditional operator inside an interpolated string, but because it has a colon in it, the compiler thinks that after the colon comes a format string.</p>
  
  <pre><code>$"test {foo ? "foo is true" : "foo is false"}";
  </code></pre>
  
  <p>How can I use this type of statement?
  The only thing that comes to my mind is something like this:</p>
  
  <pre><code>var fooString = foo ? "foo is true" : "foo is false";
  $"test {fooString}";
  </code></pre>