字符串数字的形式:
1 string[] StringsContent = strT.Split(new string[] { "\r\n" },StringSplitOptions.None); 2 StringsContent = StringsContent.Where(s => !string.IsNullOrWhiteSpace(s)).ToArray();
List<string>的形式:
1 List<string> StringsContent = strT.Split(new string[] { "\r\n" }, StringSplitOptions.None).ToList(); 2 StringsContent = StringsContent.Where(s => !string.IsNullOrWhiteSpace(s)).ToList();
标签:ToList,StringSplitOptions,string,C#,StringsContent,字符串,Net,换行符 From: https://www.cnblogs.com/guangfangxiaokeai/p/16852528.html