我想传入一个void或一个int / string / bool(返回一个值)动态地这样。
Delay(MyVoid);//I wont to execute a delay here, after the delay it will execute the the param/void like so...
public static void MyVoid()
{
MessageBox.Show("The void has started!");
}
public async Task MyAsyncMethod(void V)
{
await Task.Delay(2000);
V()
}
ps,我尝试过使用Delegates,但不能将它作为参数使用。