N
news.microsoft.com
Hello,
I have redirected standard output to disk file using the below code snippet
SteramWriter fileout;
try
{
fileout=new StreamWriter("logfile.txt");
}
catch(IOException ioe)
{
Console.WriteLine(ioe.Message + " cannot open file");
return;
}
Console.SetOut(fileout);
Console.WriteLine("Beginning of the file");
for(int i=0;i<10;i++)
Console.WriteLine(i);
Console.WriteLine("End of the file");
fileout.Close();
How to reset the standard output redirected to filestream to standard output
device back?
Thank you
Regards
Raj
I have redirected standard output to disk file using the below code snippet
SteramWriter fileout;
try
{
fileout=new StreamWriter("logfile.txt");
}
catch(IOException ioe)
{
Console.WriteLine(ioe.Message + " cannot open file");
return;
}
Console.SetOut(fileout);
Console.WriteLine("Beginning of the file");
for(int i=0;i<10;i++)
Console.WriteLine(i);
Console.WriteLine("End of the file");
fileout.Close();
How to reset the standard output redirected to filestream to standard output
device back?
Thank you
Regards
Raj