I have a code like the following one for working with a TextWriter stream.
TextWriter TR = new StreamWriter(@"")
try
{
//Logic
}
catch (Exception exception)
{
//Error Reporting
}
finally
{
if (TR != null)
TR.Close();
}
My .Net version is 4.0 and this code works properly on Windows 7 but it does not work properly in Windows XP!! It seems that the stream does not close and a number of buffers are not written to file! I have no idea! Can anyone help me to solve this problem please?