I'm trying to call a non static method called UpdateResults()
from a thread. This is my code:
class Live
{
Thread scheduler = new Thread(UpdateResults);
public Live()
{
scheduler.Start();
}
public void UpdateResults()
{
//do some stuff
}
}
but I get this error:
A field initializer can not refer to the property, method or non-static field 'Live.UpdateResults ()'
how can I fix this?