Type arguments inferred for method '<procedurename>' result in the following warnings :<warninglist>

A generic procedure is called without supplying any type arguments, and the inferred type arguments result in one or more warnings.

Normally, when you invoke a generic type, you supply a type argument for each type parameter that the generic type defines. If you do not supply any type arguments, the compiler attempts to infer the types to be passed to the type parameters. If the inferred types cause ambiguity, or if they create a situation that could lead to unexpected results, then the compiler generates this warning.

A constraint on a type parameter limits what type arguments can be passed to it. For example, a type parameter might be constrained to be a class that implements the IComparable<T> interface. For more information, see "Constraints" in Generic Procedures in Visual Basic.

By default, this message is a warning. For information on hiding warnings or treating warnings as errors, see Configuring Warnings in Visual Basic.

Error ID: BC41006

To correct this error

  • Supply type arguments to the generic procedure so that the compiler does not have to infer them.

See Also


Generic Types in Visual Basic

Generic Procedures in Visual Basic


Type List