I would like to cast a Task<object> to Task<?> at the runtime like that :

return task.CastTo(targetType);

Here is my best approach:

首页 > 解决方案 > 如何施放任务 to Task?

I would like to cast a Task<object> to Task<?> at the runtime like that :

return task.CastTo(targetType);

Here is my best approach: