public class Test
{
public static async Task<string> Add(string name)
{
await Task.Delay(1000);
return "hello" + name;
}
public static async Task<int> Count()
{
await Task.Delay(1000);
return 1;
}
}
var type = typeof(Test);
object m1 = type.CallMethod("Add", "Job");
object m2 = type.CallMethod("Count");
how to await m1 and m2 ?
Task<string> task1 = m1 as Task<string>;
Task<int> task2 = m2 as Task<int>;
Although this can be done
but how to do like common..
object val = await m1 ?
object val2 = await m2 ?
because i need the object value...
how to await m1 and m2 ?
but how to do like common..
object val = await m1 ?
object val2 = await m2 ?
because i need the object value...