Whether the method that is called in ParameterizedThreadStart can use more than one parameter?
class Fungsi
{
public void satu(int a, int b)
{
for (int x = 0; x <= 20; x++)
{
tampil(a, b, '=', x);
b++;
Thread.Sleep(1000);
}
}
}
class Program
{
static void Main(string[] args)
{
Fungsi a = new Fungsi();
Console.CursorVisible = false;
Thread ab = new Thread(new ParameterizedThreadStart(a.satu));
ab.Start(10,1);
Console.ReadLine();
}
}
why Thread ab = new Thread(new ParameterizedThreadStart(a.satu));
how to use ParameterizedThreadStart?
and I want to create 4 Multithread with one method
Thread ab = new Thread(() => satu(10, 1)); ab.Start();