I read a text file from the hard drive, then I want to put this text in a textbox and keep the same formatting from the file (the tabulations for example).
When I open the file in a simple notepad, the formatting is good, but when putting the text in the textbox, the formatting is kind of weird, i.e:
UPDATE MYTABLE
SET ID = :id,
THENAME = :name,
INFO = :info,
FILESIZE = :size,
COMPLETEPATH = :path
Instead of:
UPDATE MYTABLE
SET ID = :id,
THENAME = :name,
INFOS = :info,
FILESIZE = :size,
COMPLETEPATH = :path
How can I keep the formatting? I tried with the methods of StreamReader and File (ReadToEnd, ReadLine, ReadAllText) with all encoding available (UTF7, UTF8, UTF32, ASCII, UNICODE, BigEndianUnicode).