Formatting
You can apply format specifiers inside the braces.
double pi = 3.14159;Console.WriteLine($"Pi to 2 decimals: {pi:F2}");Run the Application
Section titled “Run the Application”dotnet runResult
Section titled “Result”Pi to 2 decimals: 3.14