先看下面的这组字符,如果输出来,它是无法靠右对齐:string[]s1={"300","5","54210","6300","88"};foreach(stringsins1){strings2=s;Console.WriteLine(s2);}SourceCodeC#的处理字符串有一个方法,PadLeft(),string[]s1={"300","5","54210","6300","88"};foreach(stringsins1){strings2=s.PadLeft(7,'')...
查看全文