Passing Text for command line
- by Kasun
Hi, I need to pass some text which is in richtext box to command line. This is my Button click even which start the cmd.
private void button1_Click(object sender, EventArgs e)
{
ProcessStartInfo psi = new ProcessStartInfo
{
FileName = "cmd",
Arguments = @"/k ""C:\Program Files\Microsoft Visual Studio 9.0\VC\bin\vcvars32.bat""",
};
Process.Start(psi);
}
In my rich text box contain following text.
include iostream
using namespace std;
int main()
{
cout << "Welcome to the wonderful world of C++!!!\n";
return 0;
}
Can anyone provide me necessary codes.