#include "stdafx.h"
using namespace System;
using namespace System::IO;
int main()
{
StreamWriter^ sw = gcnew StreamWriter("textfile.txt");
sw->WriteLine("asdf");
sw->Flush();
sw->Close();
StreamWriter^ sw2 = File::CreateText("newtextfile.txt");
StreamReader^ sr = gcnew StreamReader("textfile.txt");
String^ line;
while ((line = sr->ReadLine()) != nullptr)
{
Console::WriteLine(line);
}
}