无法从这些实参推断类型形参的数据类型,因为这些数据类型不会转换为同一类型Data type(s) of the type parameter(s) cannot be inferred from these arguments because they do not convert to the same type

无法根据这些参数推断出类型参数的数据类型,因为它们没有转换为同一类型。Data type(s) of the type parameter(s) cannot be inferred from these arguments because they do not convert to the same type. 显式指定数据类型可更正此错误。Specifying the data type(s) explicitly might correct this error.

当重载决策失败时发生此错误。This error occurs when overload resolution has failed. 它以从属消息的形式发生,该消息指出已消除特定的重载候选。It occurs as a subordinate message that states why a particular overload candidate has been eliminated. 此错误解释编译器无法使用类型推断功能来确定与实参兼容的类型形参的数据类型。The error explains that the compiler cannot use type inference to find data types for the type parameters that are compatible with the arguments.

备注

当无法指定实参时(例如,对于查询表达式中的查询运算符),显示的错误消息不包括第二个句子。When specifying arguments is not an option (for example, for query operators in query expressions), the error message appears without the second sentence.

有关详细信息和示例,请参阅 无法根据这些参数推断出方法 "" 中类型) (形参的数据类型 (s) , <methodname> 因为它们不会转换为同一类型For more information and examples, see Data type(s) of the type parameter(s) in method '<methodname>' cannot be inferred from these arguments because they do not convert to the same type.

错误 ID: BC36659 和 BC36656Error ID: BC36659 and BC36656

请参阅See also