Quick question, I just can't seem to find the answer on google
I've been using C# String.Format for formatting numbers before like this (in this example I simply want to insert a space):
String.Format("{0:### ###}", 123456);
output:
"123 456"
Here's the thing, in this particular case, the number is a string. My first thought was to simply parse it to a number, but it makes no sense in the context, and there must be a prettier way.
Following does not work, as ## looks for numbers
String.Format("{0:### ###}", "123456");
output:
"123456"
I'm sure the answer is super obvious, but I just can't seem to figure it out, What is the string equivalent to # when formatting? The awesomeness of String.Format is still fairly new to me