我正在tring返回一個int值與值逗號分隔符。如12345在C#中的String.Format不返回修改int值
的follwing代碼工作
12345將返回:
int myInt = 1234567;
MessageBox.Show(string.Format("My number is {0}", myInt.ToString("#,#")));
12345如預期的那樣顯示。
雖然下面的代碼確實沒有工作,但是從我讀什麼,應該工作:
int myInt = 1234567;
MessageBox.Show(string.Format("My number is {0:#,#}", myInt.ToString()));
12345顯示。
你能幫我理解第二組代碼不工作的原因嗎?
感謝
謝謝所有的repsonses的。我很感激! – 2010-10-04 20:16:43