'<method1>' cannot override '<method2>' because they differ by a parameter that is marked as 'ByRef' versus 'ByVal'

You have attempted to override a method with another method that differs by a parameter marked ByRef instead of ByVal. Overridden members must have the same arguments as the inherited members from the base class.

Error ID: BC30398

To correct this error

  • Make sure the parameters are either both ByRef or both ByVal.

See Also

Concepts

Overriding Properties and Methods

Passing Arguments by Value and by Reference