Using String Builder in C#
StringBuilder line = new StringBuilder(); //Appending the data using (StreamReader rwOpenTemplate = new StreamReader(pgTemplate)) { while (!rwOpenTemplate.EndOfStream) { line.Append(rwOpenTemplate.ReadToEnd()); } }