Im trying to call a function "disp" and parse through the number 1, having issues with it stating that the method name is expected. If I could understand how to parse a number and the function in the threadstart that would be amazing. Thank you in advance
class Class1
{
public static void disp(int num)
{
try
{
Console.WriteLine(num);
Thread.Sleep(500);
}
catch (Exception e)
{
Console.WriteLine("ERROR");
}
Console.WriteLine("Done");
}
public static void Main(string[] args)
{
ThreadStart ts1 = new ThreadStart(disp(1));
Thread t = new Thread(ts1);
t.Start();
Console.ReadLine();
}
}
}