将以逗号为分隔符的字符串转换成字符串数组
随笔记一下:
需要引用:
using System.Text.RegularExpressions;
1 public static string[] StrList(string ValStr) 2 { 3 int i = 0; 4 string str = ValStr; 5 string[] sArray = Regex.Split(str, ",", RegexOptions.IgnoreCase); 6 return sArray; 7 }
View Code
版权声明:本文为Maxs原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。