Ofstream equivalent in C#
Hi everyone,
I have to convert the following C++ lines in C# :
ofstream ParamFile("../filename.txt", ios::trunc);
ParamFile << a_variable;
ParamFile.close();
I have no idea of how to write it in C#.
I also wonder how you start a Java program via C# code. With C++, it was simply :
system("nameofthefile.bat");
Thanks for reading this post.
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.

ssswamiiRank #4,500 · 340 reputationPosted Nov 12, 2003, 6:29 AM EST
jcity444Rank #3,217 · 446 reputationPosted Nov 12, 2003, 7:50 AM EST
david.khoy6 reputationPosted Nov 18, 2003, 11:17 PM EST