c# 以換行(\r\n)拆分字符串c#
字符串數組形式: string[] striparr = strip.Split(new string[] { "\r\n" }, StringSplitOptions.None); striparr = striparr.Where(s => !string.IsNullOrEmpty(s)).ToArray(); List<sting>形式: List<string> striparr = strip.Split(new string[] { "\r\n" }, StringSplitOptions.None).ToList(); striparr = striparr.Where(s => !string.IsNullOrEmpty(s)).ToList();