i want to make a method async
public static void PrepareData<T>()
{
// prepare data ....
}
i was trying to do the following
Func method = PrepareData<T>;
method.invoke
...
but it complain Func must specify something e,g Func
so my question is, how to make a void return method asyn??
Thanks.
You should use Action instead of Func. The Action family is for functions with a void return type, Func is for those that actually return something.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With