[c#] Reading from memory stream to string

string result = Encoding.UTF8.GetString((stream as MemoryStream).ToArray());