String.Split 如何保留空行
使用 string.split 方法并传入 stringsplitoptions.removeemptyentries 之外的选项,或者不指定该枚举值(默认行为),即可保留拆分文本中的空白行。在 .net framework 和 .net core/5+ 中,默认调用 split(char[], stringsplitoptions) 时若省略第二个参数或传入 stringsplitoptions.none,空字符串元素会被保留在结果数组中。

withEmptyLines











