Fixed decimal places is easy
String.Format(\"{0:F1}\", 654.321);
gives
654.3
How do I feed the number of
I used two interpolated strings (a variant of Michael's answer):
double temperatureValue = 23.456; int numberOfDecimalPlaces = 2; string temperature = $"{temperatureValue.ToString($"F{numberOfDecimalPlaces}")} \u00B0C";