string test = "程$晓$";

  使用:string[] temp = test.Split(new string[] { "$" }, StringSplitOptions.RemoveEmptyEntries);
  输出结果:数组长度为2 temp[0]="程" temp[1]="晓";
 

  使用:string[] temp = test.Split(new string[] { "$" }, StringSplitOptions.None);或string[] temp = test.Split('$');


  输出结果:数组长度为3 temp[0]="程" temp[1]="晓" temp[2]="";
  

 

  参考:http://www.cnblogs.com/chengxiaohui/articles/1815104.html

相关文章:

  • 2021-12-02
  • 2021-12-05
  • 2021-08-21
  • 2022-12-23
  • 2021-06-19
  • 2022-12-23
  • 2022-03-08
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-08-19
  • 2022-12-23
  • 2021-12-26
  • 2021-09-26
  • 2021-10-19
  • 2022-12-23
相关资源
相似解决方案