string[] str="1,2,3,11,12,13".Split(',');这样会用,号分隔出所有字符并存入数组
还可以使用正则表达式: 例如:string numSource = "123,212,1234,221,442,256";Regex r = new Regex ( "\\d+" );MatchCollection mc = r.Matches ( numSource );foreach ( Match m in mc ) { Console.Write ( m.Value + "\t" );}
用Splitstring aa = "1234,234523,4324,324";
int bb= aa.Split(',');int[] ccfor(int i=0;i
string a = "1,2,3,11,12,13";List