Share via


<type> parameters cannot be declared 'Optional'

A definition of a delegate, event, or operator declares an Optional (Visual Basic) parameter.

Optional parameters are allowed only on Declare, Function, Property, and Sub parameters.

Error ID: BC33010

To correct this error

  • Remove the Optional keyword from the parameter list.

  • If you are defining an operator, you might be able to achieve the Optional functionality with a series of overloads.

  • If you are defining a delegate or event, you must rework the overall logic of this part of your application. You cannot use Optional or ParamArray parameters, or overloaded versions, on delegate or event parameters.

See Also

Concepts

Operator Procedures

Reference

Overloads

Operator Statement