Olası Çoğalt:
Number formatting: how to convert 1 to "01", 2 to "02", etc.?Int (sayı), baştaki sıfırlarla dize dönüştürün mü? (4 hane)
nasıl aşağıdaki şemayı kullanarak string
için int
dönüştürebilir? 0001
123
Tabii 0123
için dönüştürür
1
dönüştürür, dize uzunluğu dinamiktir. Bu örnek için, bu değer:int length = 4;
Nasıl dönüştürebilirim? Böyle
http://stackoverflow.com/questions/4432734/c-sharp-pad-left-to-string http: // stackoverflow .com/questions/5972949/sayı biçimlendirme, http://stackoverflow.com/questions/4325267/c-sharp-convert-int-to-string-with-padding-zeros –