string s = "123";
int n = Convert.ToInt32(s[1]);//1
n = Convert.ToInt32(s[1].ToString());//2
s.Insert(0,"0");//3
s = s.Insert(0, "0");//4
一与二,三于四的区别,为什么会这样
...全文
1225打赏收藏
麻烦解释下这几句
string s = "123"; int n = Convert.ToInt32(s[1]);//1 n = Convert.ToInt32(s[1].ToString());//2 s.Insert(0,"0");//3 s = s.Insert(0, "0");//4 一与二,三于四的区别,为什么会这样
int n = Convert.ToInt32(s[1]);char转int 50
n = Convert.ToInt32(s[1].ToString());char to string
s.Insert(0,"0");//索引位置插入0
s = s.Insert(0, "0");//索引位置插入0,0123