在 C# 中使用十六进制表示 CRLF
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/87222/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-03 11:27:46 来源:igfitidea点击:
representing CRLF using Hex in C#
提问by
How do i represent CRLF using Hex in C#?
我如何在 C# 中使用十六进制表示 CRLF?
采纳答案by James Curran
Since no one has actually given the answer requested, here it is:
由于没有人实际给出所要求的答案,这里是:
"\x0d\x0a"
回答by Jonathan Rupp
Not sure why, but it's 0x0d, 0x0a, aka "\r\n".
不知道为什么,但它是 0x0d、0x0a,又名“\r\n”。
回答by Anonymous
End-of-Line characters.
行尾字符。
For DOS/Windows it's
对于 DOS/Windows,它是
x0d x0a (\r\n)
and for *NIX it's
对于 *NIX,它是
x0a (\n)
- dos2unix - Convert
x0d x0a
tox0a
to make it *NIX compatible. - unix2dos - Convert
x0a
tox0d x0a
to make it DOS/Win compatible.
- dos2unix - 转换
x0d x0a
为x0a
*NIX 兼容。 - unix2dos - 转换
x0a
为x0d x0a
使其与 DOS/Win 兼容。