I have filled up a List with many elements of "Hello".
Now I wonder how it is possible to use MemoryStream to "chunk" this and append it to an existing file.("C:\\OutFile.txt")
I have googled around on examples for 2 days without really understand how to do this.
I have understand that I need to write to memorystream and from here in somehow write from memorystream but it just leaves me with these words.
My beginning code is like follows. How can I do this ? Thank you.
List<String^>^ FillUp = gcnew List<String^>();
for (int i = 0; i < 1000000; i++)
{
FillUp->Add("Hello");
}
String^ OutPath = "C:\\OutFile.txt";
FileStream^ fs = gcnew FileStream(OutPath, FileMode::Append, FileAccess::ReadWrite);
StreamWriter^ WriteToFile = gcnew StreamWriter(fs);