110,539
社区成员
发帖
与我相关
我的任务
分享
string str = "0,1|1,1|2,1|3,1|4,1|5,1|";
string[] splits = str.Split(new char[] { '|' }, StringSplitOptions.RemoveEmptyEntries);
string result = string.Empty;
foreach (string substr in splits)
{
result += substr[0].ToString();
}
string str = "0,1|1,1|2,1|3,1|4,1|5,1|";
string s = "";
for (int i = 0; i < str.Length; i++)
{
s = s + str.Substring(i, 1);
i = i + 3;
}
MessageBox.Show(s);