No accessible '<genericprocedurename>' accepts this number of type arguments

A statement calls a generic procedure that has more than one overloaded version, but none of the overloaded versions defines the same number of type parameters as the number of type arguments supplied in the call.

If there is only one generic version, you call it without type arguments, and the compiler can attempt type inference. For more information, see "Type Inference" in Generic Procedures in Visual Basic. However, if there is more than one generic version, the compiler is not able to choose among them unless you supply type arguments. If you supply one type argument, you must supply a type argument for every type parameter that one of the overloaded versions defines.

Error ID: BC32118

To correct this error

  • Decide which overloaded version you want to call, and then supply the appropriate number of type arguments.

See Also

Concepts

Procedure Overloading

Generic Types in Visual Basic

Generic Procedures in Visual Basic

Reference

Overloads