我有一个用户输入的浏览器文本框。我正在尝试以下方法来拆分他们通过换行输入的内容。我尝试了以下但没有工作。我要么得到错误,要么没有分裂:
content.Split("\n", StringSplitOptions.None) < gives me an error Error The best overloaded method match for 'string.Split(params char[])' has some invalid arguments
content.Split('\n', StringSplitOptions.None) < gives an error: The best overloaded method match for 'string.Split(params char[])' has some invalid arguments
content.Split(new[] { Environment.NewLine }, StringSplitOptions.None) < doesn't split as needed. When I look at the source in debugger I just see \n characters.
content.Split(new[] { "\r\n" }, StringSplitOptions.None) < doesn't split as needed. When I look at the source in debugger I just see \n characters.
谁能建议我能做什么?