Your code is equivalent to:
Console.WriteLine(String.Format("Test 2: {0:formatString}", i));
Since formatString is in the format string, you can String.Format calls to put the value in the format string:
Console.WriteLine(String.Format(String.Format("Test 2: {{0:{0}}}", formatstring), i));
This is not supported by string interpolation.
Guffa source share