生成指定位数的编号 C#

 1    if (TextBox1.Text.Length >  8)
 2         {
 3             TextBox1.Text = TextBox1.Text.Substring( 08);
 4         }
 5          else
 6         {
 7              int j =  8 - TextBox1.Text.Length;
 8              for ( int i =  0; i < j; i++)
 9             {
10                 TextBox1.Text =  " 0 " + TextBox1.Text;
11             }
12         }

你可能感兴趣的:(C#)