private void Test()
{
System.IO.MemoryStream data = new System.IO.MemoryStream(TestStream());
byte[] buf = new byte[data.Length];
data.Read(buf, 0, buf.Length);
}
//this will get a string with all the text from the file
var fileText = File.ReadAllText(@"path omyfile.txt");
//this will get all of the lines of the file as an string[]
var fileLines = File.ReadAllLines(@"path omyfile.txt");