C# "".Split 后数组长度是多少?
ITPOW2019/5/13 12:23:30
string s = ""; string[] arr = s.Split(new string[] { "|" }, StringSplitOptions.RemoveEmptyEntries); Console.Write(arr.Length);
以上结论 arr.Length 为 0,但是如果我们没有使用 RemoveEmptyEntries,而是使用 None,则 arr.Length 为 1。
<<返回首页<<