C#

C#

Made by DeepSource

Empty interpolated string CS-W1000

Bug risk
Critical
Autofix

String interpolation requires that you specify the string that is to be interpolated and the required arguments. Failing to specify the required arguments may result in an ill-formatted string. Because it is possible that such strings can critically alter the behaviour and control-flow of the program, it is suggested that you fix it as soon as possible.

Bad Practice

var pi = 3.14
var message = $"The value of `pi` is pi";

Recommended

var pi = 3.14
var message = $"The value of `pi` is {pi}";

Reference