Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
这里我有一个字符串值0515,我想1505从前端(C#)显示。
0515
1505
有人知道吗?
String Str1 = ds.table[0].rows[a][5];
从Str1我得到,0515但我想显示为1505。
Str1
string temp = ds.table[0].rows[a][5]; string Str1 = temp.Substring(2) + temp.Substring(0, 2);
不使用连接字符串的另一种方法如下
string Str1 = string.Format("{0}{1}", s1.Substring(2), s1.Substring(0, 2));