Sunday, 11 August 2013

c# File ReadAllText only reads first Char

c# File ReadAllText only reads first Char

in a current development I'm stuck with a strang problem.
In a bunch of written files on my harddisk i want to read out their
content and write it into a textbox. It seams very easy, but somehow i
stuck in a catch:
The files are containing something like this: ""
I read them with:
textBox1.Text = File.ReadAllText(filetoread);
The result of this "ReadAllTest" is only the first Char "<" everything
else in not written into the textbox. Manually I can read the file with
the normal Editor and this shows the complete text.
Are there any traps or limitations a haven't seen?
Best regards

No comments:

Post a Comment