I am tring to return an int value with comma seperators within the value.
12345 would be returned as 12,345
The follwing code works:
int myInt = 1234567;
MessageBox.Show(string.Format("My number is {0}", myInt.ToString("#,#")));
12,345 is displayed as expected.
While the following code does no work, but from what I am reading, should work:
int myInt = 1234567;
MessageBox.Show(string.Format("My number is {0:#,#}", myInt.ToString()));
12345 is displayed.
Can you help me understand why the second set of code is not working?
Thanks