Related questions
Save and load MemoryStream to/from a file
I am serializing an structure into a MemoryStream and I want to save and load the serialized structure.
So, How to Save a MemoryStream into a file and also load it back from file?
Save byte array to file
I have a byte array (an IEnumerable actually), and I need to save it to a new file containing this data.
How do I do that?
I found some answers telling how to create a MemoryStream from that, but still …
ReadAllLines for a Stream object?
There exists a File.ReadAllLines but not a Stream.ReadAllLines.
using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("Test_Resources.Resources.Accounts.txt"))
using (StreamReader reader = new StreamReader(stream))
{
// Would prefer string[] result = reader.ReadAllLines();
string result = reader.ReadToEnd();
}
Does there exist …