Conditional attribute and calculated arguments for method

Viewed 865

I have code like this in my code

Debug.WriteLine($@"Operation time: {elapsedMilliseconds}ms");

Write line marked with [Conditional("DEBUG")], that means that calls of this method will be omitted in release.

[Conditional("DEBUG")]
[__DynamicallyInvokable]
public static void WriteLine(string message, string category)
{
  TraceInternal.WriteLine(message, category);
}

But, will it call string.Format for argument of this method in RELEASE or remove it too?

1 Answers
Related