Code "\", \ x0A \ x0D "in C # when writing CSV

Can someone please tell me that his verification is in the following condition.

if (s.IndexOfAny("\",\x0A\x0D".ToCharArray()) > -1) 
+6
source share
2 answers

It checks if there is any quotation mark, comma \x0A line-feed \x0A or carriage return \x0D in line s .

\x0A is a running hexadecimal string. Equivalent to \n .
\x0D is the evacuated hexadecimal carriage return. Equivalent to \r .

+11
source

\x0A\x0D displays hexadecimal carriage return and line characters.

+2
source

Source: https://habr.com/ru/post/906956/


All Articles