Open
Description
Type of issue
Code doesn't work
Description
If the intent was to show the progress percentage, parentheses are needed around (ctr + 1)
:
for (int ctr = 0; ctr < 500; ctr++)
Console.WriteLine($"Line {ctr + 1} of 500 written: {(ctr + 1) / 500.0:P2}");
Example Output
Line 498 of 500 written: 99.60%
Line 499 of 500 written: 99.80%
Line 500 of 500 written: 100.00%
Page URL
Content source URL
https://github.com/dotnet/dotnet-api-docs/blob/main/xml/System.Diagnostics/Process.xml
Document Version Independent Id
981e4b00-7db9-eeab-ce84-6f23ecde07a1
Platform Id
8ec5d3e5-25ef-3c4a-5a94-e2d67ac91358