日期:2014-05-17 浏览次数:20866 次
string str=b.ToString();//b==9 for(int i=1;i<a;i++)//a==10 { str+="0"; } return str;
------解决方案--------------------
Dim str As String = b & Space(a-1)
str = str.Replace(" ","0")
或者
Dim str As String = (b & Space(a-1)).Replace(" ","0")
------解决方案--------------------
[code=C#] int a = 10;
string first = "b";
string s = first + new string('0', a - first.Length);
Response.Write(s);/code]
------解决方案--------------------
string.PadRight方法可以解决你的问题
string str = "forty-two"; char pad = '.'; Console.WriteLine(str.PadRight(15, pad)); // Displays "forty-two......". Console.WriteLine(str.PadRight(2, pad)); // Displays "forty-two".
------解决方案--------------------
[code=vb]Activator.CreateInstance(TypeGet, arrObj)[/code]