Monthly Archives: December 2018

C# – Numeric specifiers (standard ones)

Nine standard numeric specifiers. Currency Formats the value as a currency, using a currency symbol. The currency symbol used will  depend on the culture setting of the PC running the program. Precision specifier: The number of decimal places. Sample: Console.WriteLine(“{0 :C}”, 12.5); … Continue reading

Posted in Uncategorized | Leave a comment

C# – the Format field for numeric representation

Either currency, decimal or hexadecimal or in fixed point notation. Example: Console.WriteLine(“{0:F4}”, 12.345678); Three parts to format field: the colon character must be next to the format specifier with no intervening spaces the format specific is a single alphabetic character from … Continue reading

Posted in Uncategorized | Leave a comment

C# – Formatting numeric strings

Formatting numeric strings is something that seems a developer would need to use now & again. You should know the alignment specifier; this indicates the minimum width of a field in terms of characters. Two key parts to it. An … Continue reading

Posted in C# | Leave a comment