converting bytes to a string C#
<p>I want to convert a binary file to a string which could be then converted back to the binary file.
I tried this:</p>

<pre><code>byte[] byteArray = File.ReadAllBytes(@"D:\pic.png");
for (int i = 0; i &lt; byteArray.Length; i++)
{
    textBox1.Text += (char)byteArray[i];
}
</code></pre>

<p>but it's too slow, it takes about 20 seconds to convert 5KB on i5 CPU.
I noticed that notepad does the same in much less time.
Any ideas on how to do it?</p>

<p>Thanks</p>
