convert string to memory stream – Memory stream is not expandable?
The following code works correctly for me public class Foo { public static void Main() { var myPage = “test string”; var repo = new System.IO.MemoryStream(System.Text.Encoding.UTF8.GetBytes(myPage)); } } It seems that the correct way to do this is to create the MemoryStream using the default constructor var repo = new System.IO.MemoryStream(); and then write to … Read more