c# Split 拆分 每行同时有tab和空格的字符串,如何实现?
c#Split拆分每行同时有tab和空格的字符串,如何实现?//将每行数据,用-分割成6段char[]separator={'\t',''};string[]data=r...
c# Split 拆分 每行同时有tab和空格的字符串,如何实现?
//将每行数据,用-分割成6段
char[] separator = { '\t',' '};
string[] data = reader.ReadLine().Replace("\t"," ").Split(separator);
//string[] data = reader.ReadLine().Replace("----", "-").Split('-'); 展开
//将每行数据,用-分割成6段
char[] separator = { '\t',' '};
string[] data = reader.ReadLine().Replace("\t"," ").Split(separator);
//string[] data = reader.ReadLine().Replace("----", "-").Split('-'); 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询