You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My understanding is that the diagnostic aims to improve performance by allowing interpolation/concatenation to be avoided when the log message would be filtered out, and the result discarded.
In the case of ?? this seems excessive. While the ?? can be avoided, it's typically a very cheap operation and doesn't allocate (in this example at least);
The text was updated successfully, but these errors were encountered:
Analyzer
Diagnostic ID: CA2254:
Template should be a static expression
Analyzer source
SDK: Built-in CA analyzers in .NET 5 SDK or later
Version: SDK 8.0.200
Describe the bug
My understanding is that the diagnostic aims to improve performance by allowing interpolation/concatenation to be avoided when the log message would be filtered out, and the result discarded.
In the case of
??
this seems excessive. While the??
can be avoided, it's typically a very cheap operation and doesn't allocate (in this example at least);The text was updated successfully, but these errors were encountered: