foreach ( string line in content)
{
string[] na = new string[2];
na=line.Split(new char[]{'空格 '},StringSplitOptions.RemoveEmptyEntries); //其实是new char[]{' '},把空格写出来形象一点!
如上面红色字体,为什么要用new char[]{'空格'},直接Split('空格')或者new string[]{'空格'}不行吗?na是代表整个数组,还是整个char字符或是整串string字符串?
StringSplitOptions.RemoveEmptyEntries有什么作用? |