C#String.Split (string[], StringSplitOptions)中的StringSplitOptions是什么意思,看了msdn还是不懂?

MSDN上面这样子写的:

[ComVisibleAttribute(false)]

public string[] Split(string[] separator,StringSplitOptions options)
参数
separator
类型:System.String[]
分隔此字符串中的子字符串的字符串数组、不包含分隔符的空数组或 null。

options
类型:System.StringSplitOptions
要省略返回的数组中的空数组元素,则为 RemoveEmptyEntries;要包含返回的数组中的空数组元素,则为 None。

返回值
类型:System.String[]
一个数组,其元素包含此字符串中的子字符串,这些子字符串由 separator 中的一个或多个字符串分隔。 有关更多信息,请参见“备注”一节。
 
2014-04-05 21:37 提问者采纳
 
   class Program
    {
        static void Main(string[] args)
        {
            string s = "123,abc1ab";
            string[] aa = s.Split(new char[] { ',''1' }, StringSplitOptions.RemoveEmptyEntries);
            string[] bb = s.Split(new char[] { ',' '1'});
        }
    }

追问
很是感谢!!!这个局部变量的框是从哪儿打开的??
回答
按F10 单步执行,在VS底部会出现这个“局部变量”;
追问
找到了,但是不会用,运行完了,怎么数组中的值怎么都是空的?
回答
一定要按F10 启动单步调试,只有在单步调试模式下才能查看局部变量;
追问
没有单步调试啊,只有逐语句。。。。。
回答

原文地址:https://www.cnblogs.com/zhaoxinshanwei/p/4034235.html