Hello All,
I have the following line of code that creates text file. The problem is after about 5000+ recursion, i get StackOverflowException. Could you guys suggest me an alternative way or problem with the code? TIA
try
{
using (TextWriter tw = new StreamWriter(filename))
{
// write a line of text to the file
//StackOverflowException Error occurs here.
tw.WriteLine(_Html);
// close the stream
tw.Close();
}
}
catch (Exception)
{
throw;
}
Thanks,
MB
I have the following line of code that creates text file. The problem is after about 5000+ recursion, i get StackOverflowException. Could you guys suggest me an alternative way or problem with the code? TIA
try
{
using (TextWriter tw = new StreamWriter(filename))
{
// write a line of text to the file
//StackOverflowException Error occurs here.
tw.WriteLine(_Html);
// close the stream
tw.Close();
}
}
catch (Exception)
{
throw;
}
Thanks,
MB