I have an IEnumerable, which is \"streamed\" per yield statements from a method. Now I want to convert this enumerable to a Str
I think you can use it in this first convert your string to byte array and use memory stram afterwards
string sourceFile = System.Web.HttpContext.Current.Server.MapPath(Path.Combine("/", "yourAddress"));
byte[] byteArray = System.IO.File.ReadAllBytes(sourceFile);
MemoryStream mem;
using (mem = new MemoryStream())
{
mem.Write(byteArray, 0, (int)byteArray.Length);
return mem;
}