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: Positive Values Negative Values Zero Values by using a single format string. The ; character acts as a separator...

Category: C# | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 265 | Hits: 15

Similar Posts

  • Troubleshooting BlogML - .NET Library more
  • ConfigSource attribute on system.serviceModel section more
  • CS Dev Guide: Forums more
  • ASP.NET 2.0 MVP Hacks and Tips more
  • Examining ASP.NET 2.0's Site Navigation - Part 1 more
  • Stylesheets for XAML more

News Categories

.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Data | DataGrid | DataSet | Debugger | DotNetNuke | Events | GridView | IIS | Indigo | JavaScript | Mobile | Mono | Patterns and Practices | Performance | Podcast | Refactor | Regex | Security | Sharepoint | Silverlight | Smart Client Applications | Software | SQL | VB.NET | Visual Studio | W3 | WCF | WinFx | WPF | WSE | XAML | XLinq | XML | XSD