C# 方法的条件属性和计算参数

C# 方法的条件属性和计算参数,c#,conditional-attribute,C#,Conditional Attribute,我的代码中有这样的代码 Debug.WriteLine($@"Operation time: {elapsedMilliseconds}ms"); 用[Conditional(“DEBUG”)]标记的写行,这意味着在发行版中将省略此方法的调用 [Conditional("DEBUG")] [__DynamicallyInvokable] public static void WriteLine(string message, string category) { TraceInternal

我的代码中有这样的代码

Debug.WriteLine($@"Operation time: {elapsedMilliseconds}ms");
用[Conditional(“DEBUG”)]标记的写行,这意味着在发行版中将省略此方法的调用

[Conditional("DEBUG")]
[__DynamicallyInvokable]
public static void WriteLine(string message, string category)
{
  TraceInternal.WriteLine(message, category);
}
但是,它会在发行版中为该方法的参数调用string.Format还是将其删除?

在此处找到答案-

如果定义了符号,则包括呼叫;否则,电话 (包括调用参数的评估)被省略