Using the '?', '$' and ':' sign in C# : <p>I recently came across this bit of code:</p>

<pre><code> public void AppendTextColour(string text, Color color, bool AddNewLine = false)
        {
            rtbDisplay.SuspendLayout();
            rtbDisplay.SelectionColor = color;
            rtbDisplay.AppendText(AddNewLine
                ? $"{text}{Environment.NewLine}"
                : text);
            rtbDisplay.ScrollToCaret();
            rtbDisplay.ResumeLayout();
        }
</code></pre>

<p>What fascinates me about it is the restructuring of <code>AppendText();</code> bit here:</p>

<pre><code>rtbDisplay.AppendText(AddNewLine? $"{text}{Environment.NewLine}": text);
</code></pre>

<p>I can only guess that the question mark is used to instantiate the boolean value, however the dollar sign and the double dots sign here are absolutely obscure. Can anyone dissect this bit and explain it to me? </p>

<p>I apologise if I am being a bit ambiguous but I was unable to find any relevant information anywhere. :/</p>
