什么是“ \”,\x0A\x0D”;编写CSV时代码在C#中执行 [英] what "\",\x0A\x0D" code does in C# while writing CSV

查看:837
本文介绍了什么是“ \”,\x0A\x0D”;编写CSV时代码在C#中执行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以告诉我以下条件的检查吗。

Can anybody please tell me what its checking in following condition.

if (s.IndexOfAny("\",\x0A\x0D".ToCharArray()) > -1)


推荐答案

正在检查是否有引号 ,逗号,换行符 \x0A 或字符串 s 中的回车 \x0D

It's checking if there is any Quotation Mark ", Comma ,, a Line Feed \x0A or Carriage Return \x0D in the string s.

\x0A 是转义的十六进制换行符。等价于 \n

\x0D 是转义的十六进制回车符。相当于 \r

\x0A is the escaped hexadecimal Line Feed. The equivalent of \n.
\x0D is the escaped hexadecimal Carriage Return. The equivalent of \r.

这篇关于什么是“ \”,\x0A\x0D”;编写CSV时代码在C#中执行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆