No method '<methodname>' can accept an argument of type '<typename>' for parameter '<parametername>'

A method call contains an argument of a type that is not valid.

To correct this error

  1. Check the types of the arguments.

  2. Match the argument types against the parameter types of the method to make sure they are in agreement. Alter the types as necessary.

See Also


Passing Arguments by Value and by Reference