Linq Using Method Group告诉我以下方法或属性之间的调用不明确:

Linq Using Method Group告诉我以下方法或属性之间的调用不明确:,linq,delegates,method-group,Linq,Delegates,Method Group,我想在Linq中调用一个简单的方法组,但是我收到了这个错误 以下方法或属性之间的调用不明确:“System.Linq.Enumerable.Select(System.Collections.Generic.IEnumerable,System.Func)”和“System.Linq.Enumerable.Select(System.Collections.Generic.IEnumerable,System.Func)” 我理解在调用哪个方法之间存在歧义。但是,我的问题是,是否有一种方法可以指

我想在Linq中调用一个简单的方法组,但是我收到了这个错误

以下方法或属性之间的调用不明确:“System.Linq.Enumerable.Select(System.Collections.Generic.IEnumerable,System.Func)”和“System.Linq.Enumerable.Select(System.Collections.Generic.IEnumerable,System.Func)”

我理解在调用哪个方法之间存在歧义。但是,我的问题是,是否有一种方法可以指定签名,而不正常调用该方法。我想通过不必使用lambda表达式来节省输入


谢谢。

您可以明确地强制执行:


num.Select((Func)Convert.ToInt32);

如果答案满足您的问题,您可以标记我的答案。
var num = new [] { "12345", "5432" };

num.Select(Convert.ToInt32);