如何让一个小于5为的数字 ,例如10 强制显示成5位 ,如00010
然后我又如何把冲个数字00010中取出10来呢!
然后我又如何把冲个数字00010中取出10来呢!
解决方案 »
- this.dataGridView1.Columns[0].Visible = false;
- 求救 使用 twainpro 如何获得扫描仪的序列号
- 多线程?同时执行六个过程,大家有什么办法?
- 新人问个问题,获取ListView控件子项的值
- c# 怎样获取文本框textbox的光标位置
- 如何获取Oracle数据库中的CLOB字段的值,为什么我得到的是乱码一堆,不管存入表中的是中文还是英文.
- 关于如何启动Hpl文件,送分,强烈推荐!
- 循环语句,i++ ,怎么取到这个i循环了几次?
- 反射调用函数带func委托参数的问题
- C#连接Oracle?
- [WPF]ListView 如何添加一行数据
- Excel 服务器上出现Microsoft Jet 数据库引擎打不开文件''
string str=a.ToString("D5");
MessageBox.Show(str);
int b = Convert.ToInt32(str);
MessageBox.Show(b.ToString());
string b=a.ToString("D5");//10转成00010 int c=Convert.ToInt16(b);00010转成10
string b = a.ToString().PadLeft(5, '0');
MessageBox.Show(b); int c = int.Parse(b);
MessageBox.Show(c.ToString());
string s = "00010";
Console.WriteLine(i.ToString("D5"));
Console.WriteLine(i.ToString("00000"));
//
Console.WriteLine(Int32.Parse(s).ToString());
Console.WriteLine(Convert.ToInt32(s).ToString());