16
function abc
{
Thread t = new Thread(new ThreadStart(xyz));
t.SetApartmentState(ApartmentState.STA);
t.Start( );
}
function xyz
{
the code of Windows form..or whatever which is causing the error
}
I'm not sure whether you have solved this problem or not. I just encountered this problem and I fixed it by deleting my bin directory.