# C# + StreamReader + ReadToEnd(); = Dodgy results? :S

**URL:** https://forum.kirupa.com/t/c-streamreader-readtoend-dodgy-results-s/323067
**Category:** programming
**Created:** [June 15, 2011, 4:26pm UTC](https://forum.kirupa.com/t/c-streamreader-readtoend-dodgy-results-s/323067 "2011-06-15T16:26:18Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Valaran](https://avatars.discourse-cdn.com/v4/letter/v/ee59a6/32.png) [@Valaran](https://forum.kirupa.com/u/Valaran)
#### Post date: [June 15, 2011, 4:26pm UTC](https://forum.kirupa.com/t/c-streamreader-readtoend-dodgy-results-s/323067/1 "2011-06-15T16:26:18Z")

</div>

Long story short, I’ve got a configuration file that looks along the lines of (Note that this format is out of my reach):

```auto
\x02\x05TEST1\x16\x03 \x01\x06TEST2\x160\x03

```

I used the hex simply cause I wasn’t able to paste the full string otherwise, anyway.  
I’m reading that exact string with a StreamReader instance, I’m assigning the ReadToEnd() results to a string, I’m printing it to the console, but all appears is the left part of the above string, seperated by the whitespaces, so the output in my console is:

```auto
\x02\x05TEST1\x16\x03 

```

I’m pretty curious how this is possible?

```php

StreamReader fileReader = new StreamReader( "pathToMyAbomination" );
String data = fileReader.ReadToEnd();
Console.WriteLine( data );
fileReader.Close();

```

Am I mentally challenged? Or does this look completely weird?

Thank you.
