Udostępnij za pośrednictwem


<procedurename1> cannot override <procedurename2> because they differ by parameters declared 'ParamArray'

A procedure in a derived class overrides an identically named procedure in the base class, but the parameter lists are different.

To override a procedure in an inherited class, the overriding procedure must match its parameter list, access level, and return type (if any). In particular, it must match any Optional (Visual Basic) or ParamArray declaration.

Error ID: BC30906

To correct this error

  • If you want to override the procedure, make the parameter list exactly the same as the parameter list in the base class procedure. If the last parameter is declared with ParamArray in the base class procedure, declare it with ParamArray in the overriding procedure.

  • If you want a different parameter list from the base class version, you cannot override it. Consider overloading it instead. For more information, see Procedure Overloading.

See Also

Concepts

Overriding Properties and Methods

Reference

Overrides