Hi guys,
I'm currently studying threading using C#.net and I encountered a problem on how to call method with parameters inside a ThreadStart class. Below is my sample code:
// this where i got error; it says Method name expected
Thread t1 = new Thread(new ParameterizedTh readStart(Go(tr ue)));
t1.start();
static void Go(bool b)
{
Console.WriteLi ne(upper ? "hello" : "HELLO");
}
I'm currently studying threading using C#.net and I encountered a problem on how to call method with parameters inside a ThreadStart class. Below is my sample code:
// this where i got error; it says Method name expected
Thread t1 = new Thread(new ParameterizedTh readStart(Go(tr ue)));
t1.start();
static void Go(bool b)
{
Console.WriteLi ne(upper ? "hello" : "HELLO");
}
Comment