c# - Calling function on thread, trying to send command for invalid thread -


i have console application developed c#.
console run threads. works fine today need call webbrowser , information page. faced errors , decided add part of code on thread.i put code in method named mybrowsercall.
called :

var t = new thread(mybrowsercall);  t.setapartmentstate(apartmentstate.sta);  t.start(); 

this function works fine , when want call function in method faced error:

unhandled exception: system.systemexception: trying send command invalid thread

do know how can fix ?

i not fix issue change code.
called functions has issue after webbrowser part. called getdata function cause problem after thread of webbrowser. working fine now.


Comments

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

javascript - cocos2d-js draw circle not instantly -