I want to run function with void
as return type in new thread, but it always shows this error:
No overload for 'myVoid' matches delegate 'ThreadStart'
and my code :
Thread t = new Thread(new ThreadStart(myVoid)); // <-- Error Shows Here
t.Start("Test","Test2");
// And The Void :
void myVoid(string text, string text2)
{
Console.WriteLine(text + text2);
}
How I fix it? What is wrong?