file copy program in binary mode
<p>I am writing a filecopy program, but reading data from a media file such as .avi in binary mode into the string variable str throws an error related to the size of the variable str not being large enough to hold the data returned from the file read.
Here is the code through which i was trying to perform the task.</p>

<pre><code>using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
namespace ConsoleApplication7
{
    class Program
    {
        static void Main(string[] args)
        {
            string filename;
            Console.WriteLine("enter file location");
            filename=Console.ReadLine();
            FileStream fs = new FileStream(filename, FileMode.Open);
            BinaryReader br = new BinaryReader(fs);
            string str;
            str =Convert.ToString(br.Read());
            while (str != null)
            {
                Console.WriteLine(str);
                str = Convert.ToString(br.Read());
            }
            fs.Close();
            br.Close();
        }
    }
}
</code></pre>

<p>what's the solution to this.</p>
