C# NumberFormat Sections
Posted by: Rick Strahls WebLog,
on 03 Nov 2016 |
View original | Bookmarked: 0 time(s)
I'm not sure how I've missed this feature in all those years of working in C#: String.Format() support Number Formatting Sections that allow you to show separate values for positive, negative and zero values.
Take a look:
You can find the official (and very limited) documentation on this feature on MSDN:
Custom Numeric Format Strings
Number Format Sections
Sections are meant to separate:
by using a single format string. The ; character acts as a separator...