multithreading - C# threading - resetThread is a 'variable' but is used like a 'method' -


i'm trying create thread reset button colours in application i'm writing, whenever try create thread object, error 'resetthread 'variable' used 'method'. code i'm using create thread object:

system.threading.thread resetthread = new system.threading.thread(new system.threading.threadstart(resetthread)); 

and code thread:

public void resetthread() {     while (true)     {         optionone.backcolor = default(color);         optiontwo.backcolor = default(color);         optionthree.backcolor = default(color);         system.threading.thread.sleep(1000);     } } 

how go fixing this? in advance. have googled no avail.

call thread different method - call method reset() instance. can't have method , field same name @ class scope.


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -