I am using this code
string location1 = textBox2.Text; byte[] bytes = File.ReadAllBytes(location1); string text = (Convert.ToBase64S
If the file is a text file you can use a TextReader:
string location1 = textBox2.Text; string text = String.Empty; using (TextReader reader = File.OpenText(location1 )) { do { string line = reader.ReadLine(); text+=line; } while(line!=null) }