c# - SQLDataReader returns string with additional break characters \\\\ -


i using sqldatareader in c# query sql table. 1 of fields in table string holds file path, example "c:\\files\\myfiles".

however, sqldatareader returns string 2 additional backslashes. example: "c:\\\\files\\\\myfiles".

sqldatareader appears detecting escape character "\". there anyway can stop doing this?

it somehow misleading developers when inspecting value in visual studio. string this:

c:\\\\files\\\\myfiles 

but when print console exact string:

console.writeline(path); /* c:\\files\\myfiles */ 

you can click magnifier icon check exact string characters. no worries, you're safe go it visual studio adding escape characters.


Comments

Popular posts from this blog

gridview - Yii2 DataPorivider $totalSum for a column -

java - Suppress Jboss version details from HTTP error response -

Sass watch command compiles .scss files before full sftp upload -