C#: Add string interpolation examples to cs/useless-assignment-to-local.

This commit is contained in:
Michael Nebel
2025-03-20 11:42:11 +01:00
parent 2b88600f0f
commit dd1fbd28be

View File

@@ -474,3 +474,13 @@ public static class Using
}
}
}
class StringInterpolation
{
void Pi()
{
float pi = 3.14159f; // GOOD
const int align = 6; // GOOD
Console.WriteLine($"Pi, {pi,align:F3}");
}
}