I am trying to code something that retrieves and parses the HTML of a site. I am successful on that but when I try to put it into a rich textbox using a background worker I get a cross-thread exception.
List<string> retuInfo = new List<string>();
foreach (var inf in info)
{
retuInfo.Add(inf.InnerText);
richTextBox1.Lines = retuInfo.ToArray();
}
I get the exception on richTextBox1.Lines = retuInfo.ToArray();
I have looked at several things on "Unsafe threading and safe threading" but none of it really helped as threading is a pretty advanced topic and can throw some hard bugs at you.
Any possible help?