你可以看看split的参数列表,没有string类型的。只有string[]

解决方案 »

  1.   

     string[] sp = {"~~~"};
                string str = "sds~~~sdsd";
                int arp = str.Split(sp,StringSplitOptions.None).Length;
      

  2.   


    string sp = "~~~";
    string str = "sds~~~sdsd";int arp = str.Split(sp.ToCharArray()).Length;
      

  3.   

        string sp = "~~~";
                string str = "sds~~~sdsd";
                int ary = System.Text.RegularExpressions.Regex.Split(str, sp);
      

  4.   

    string sp=“辅导书~~~~~~范德萨”;
    string str =Split(sp,"~~~~~~");
    int  i=str.Length;