Sto cercando di creare un nuovo thread e passare un metodo con parametro, ma errori out.Creazione di un nuovo thread con metodo con il parametro
Thread t = new Thread(myMethod);
t.Start(myGrid);
public void myMethod(UltraGrid myGrid)
{
}
errori --------- ------------
Error: CS1502 - line 92 (164) - The best overloaded method match for '
System.Threading.Thread.Thread(System.Threading.ThreadStart)
' has some invalid argumentsError: CS1503 - line 92 (164) - Argument '1': cannot convert from 'method group' to '
System.Threading.ThreadStart
'
Immagino che dovremmo indovinare quale errore si ottiene? ** Si prega di includere l'errore che si ottiene nella tua domanda! ** – ThiefMaster
Hai più di un metodo chiamato 'myMethod' nella tua classe? –