What is a quick way to force CRLF in C# / .NET?

前端 未结 6 1535
独厮守ぢ
独厮守ぢ 2020-12-08 13:38

How would you normalize all new-line sequences in a string to one type?

I\'m looking to make them all CRLF for the purpose of email (MIME documents). Ideally this w

6条回答
  •  甜味超标
    2020-12-08 14:03

    Environment.NewLine;

    A string containing "\r\n" for non-Unix platforms, or a string containing "\n" for Unix platforms.

提交回复
热议问题