C# 无法从“System.Action<int>”转换为“System.Action”

C# 无法从“System.Action”转换为“System.Action”

代码这一部分,Action action = new Action(Method);
提示报错原因是: 参数 1: 无法从“System.Action”转换为“System.Action”

task的重载没有int这种泛型,改成下面这样

Action<object> action = new Action<object>(Method);

您好,我是有问必答小助手,您的问题已经有小伙伴帮您解答,感谢您对有问必答的支持与关注!
PS:问答VIP年卡 【限时加赠:IT技术图书免费领】,了解详情>>> https://vip.csdn.net/askvip?utm_source=1146287632