Does the C# compiler remove an if that encapsulates a debug.writeline : <p>I have a piece of code like this:</p>

<pre><code>if (state != "Ok")
{
     Debug.WriteLine($"Error occured: {state}, {moreInfo}");
}
</code></pre>

<p>Does the compiler optimize this away if i make a release build? Or does the evaluation stay and thus costing some processing time?</p>
