# Representative Line: Readable Formats

DevFeed: [Representative Line: Readable Formats](<https://devfeed.tech/articles/representative-line-readable-formats-95368.md>)

Original publisher: [Read original article](<https://thedailywtf.com/articles/readable-formats>)

Author: Remy Porter

Published: 2026-10-22T06:30:00Z

Content type: article

Language: en

Sources: [The Daily WTF](<https://devfeed.tech/sources/the-daily-wtf.md>)

Topics: [formatting](<https://devfeed.tech/topics/formatting.md>), [concatenation](<https://devfeed.tech/topics/concatenation.md>), [clean-code](<https://devfeed.tech/topics/clean-code.md>)

Tags: [formats](<https://devfeed.tech/tags/formats.md>), [net](<https://devfeed.tech/tags/net.md>), [nuget](<https://devfeed.tech/tags/nuget.md>), [representative-line](<https://devfeed.tech/tags/representative-line.md>)

## AI overview

The excerpt criticizes mixing a .NET numeric format string with concatenation to make decimal places configurable: repeated `new string('0', 2)` fragments obscure the format. It suggests assigning that fragment once to `decimalPlaces` to make the concatenation clearer. It also notes that .NET has a per-mille format specifier and objects to spelling its Unicode symbol as `\u2030` in code. The source presents this as a readability critique, not a broader comparison of formatting approaches.

## Source excerpt

We all love format strings for generating human readable text. Certainly, they're a better choice than string concatenation. Even if I have a blind spot that keeps me from remembering the printf format tokens, I still prefer to use format strings. Jasmine has a co-worker that does use format strings, but they also miss using string concatenation. So they've found a way to combine them, and avoid the perils of making readable code that describes the format of their text. myField.DataFormatString = "{0:#,##0." + new string('0', 2) + ";(#,##0." + new string('0', 2) + ")}"; Now, in their defense, I can see how this code started its life. At some point, they wanted to make the number of decimal places a parameter. And sure, this is an easy way to do that and retain the intent, though this whole thing could be cleaned up with just a simple decimalPlaces = new string('0', 2), which would make the concatenation less confusing to read. Related, while I was checking the documentation on the .NET formatting strings, I learned that they have a per-mille format specifier which requires writing a unicode sigil on most keyboards. I'm sorry, but seeing string perMilleFmt = "#0.## " + '\u2030'; in my code would be TRWTF. [Advertisement] Picking up NuGet is easy. Getting good at it takes time. Download our guide to learn the best practice of NuGet for the Enterprise.