各位高手!在c#中分割字符串是怎么使用的?给个模版参照一下!谢谢!

解决方案 »

  1.   


                string str = "a,b,c,d,e,f,g";
                string[] result = str.Split(',');
      

  2.   

    分割多个
                string str = "a,b,c,d,e|f,g";
                string[] result = str.Split(new char[] { ',', '|' });
      

  3.   

    本帖最后由 caozhy 于 2011-07-16 11:57:23 编辑
      

  4.   


    string str = "a,b,c,d,e,f,g";
    string[] result = str.Split(',');
    result={"a","b","c","d","e","f","g"};