Skip to content

Latest commit

 

History

History
38 lines (29 loc) · 2.77 KB

bc30521.md

File metadata and controls

38 lines (29 loc) · 2.77 KB
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: Overload resolution failed because no accessible '<method>' is most specific for these arguments:<error>
Overload resolution failed because no accessible '<method>' is most specific for these arguments:<error>
07/20/2015
bc30521
vbc30521
resolution failure
BC30521
overload resolution failed
b8b41fa0-a64b-4e74-8443-be3afd2b6f11

Overload resolution failed because no accessible '<method>' is most specific for these arguments:<error>

You have made a call to an overloaded method, but the compiler has found two or more overloads with parameter lists to which your argument list can be converted, and it cannot select among them.

The compiler attempts to match the data types in the calling argument list and the overload parameter list as closely as possible. It requires a widening conversion from every one of your arguments to its corresponding parameter, whether the type checking switch (Option Strict Statement) is On or Off.

If the compiler finds more than one overload satisfying the widening requirement, it then looks for the overload that is most specific for the argument data types, that is, that calls for the least amount of widening. It generates this error message when one overload is more specific for one argument's data type while another overload is more specific for another argument's data type. For more information and an example, see Overload Resolution.

Error ID: BC30521

To correct this error

  1. Review all the overloads for the method and determine which one you want to call.

  2. In your calling statement, make the data types of the arguments match the data types of the parameters defined for the desired overload. You might have to use the CType Function to convert one or more data types to the defined types.

See also