If your method has a return value, use the Func delegate, otherwise you can use the Delegate . eg:
void Method1(string param)
{
}
void Method2(string param)
{
}
void RunInThread(Action<string> m)
{
}
Then you can call RunInThreadas follows:
RunInThread(Method1);
RunInThread(Method2);
source
share