char[] charArray = startno.ToCharArray();
//using this arry
//i want to cheque this
int i=0;
count = 0;
while (chenum [i] != "0")
{
count++;
i++;
}
string s = "0";
string zero = "0";
for (i = 1; i <= count; i++)
{
s = s + zero;
}
將ü幫助我解決這個代碼... 如:(00001101),我需要用1 的,我想這個值轉換添加此沒有到int.if我轉換爲int否(1101)+1否(1102)。添加後我想要答案(00001102)。如何獲取數組的數量? INC#
PadLeft是非常漂亮的。我從未注意到它。我總是使用字符串格式化程序。謝謝! – 2011-03-03 05:10:39