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.

Note

When specifying arguments is not an option (for example, for query operators in query expressions), the error message appears without the second sentence.

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.

Error ID: BC36659 and BC36656

See Also

Concepts

Relaxed Delegate Conversion

Generic Procedures in Visual Basic

Overload Resolution