13,190
社区成员
发帖
与我相关
我的任务
分享
string str = "fkfjaf,dfasfasfas,asfasdf,,,,";
int number = 0;
foreach (char chr in str)
{
if (chr == ',')
{
number ++;
}
}
string str1 = "125,4852,892,982,9272,581,2585,25898962,586122,98254,";
string a;
int i=0;
while(str.Contains(",")) //不好意思,单词忘了,这里好像是个Contains(",")
{
i=str1.IndexOf(",");
a = str1.Substring(0,i);
this.TextBox1.Text += i.ToString() + ";";
}
Dim str As String = "125,4852,892,982,9272,581,2585,25898962,586122,98254,"
Dim lstIndex As List(Of Integer) = New List(Of Integer)
For i As Integer = 0 To str.Length - 1
If str(i) = ","c Then
lstIndex.Add(i)
End If
Next