Udostępnij za pośrednictwem


Only conversion operators can be declared '<keyword>'

An Operator Statement specifies Widening or Narrowing when the operator is not a conversion operator.

Every operator must be declared as both Public (Visual Basic) and Shared (Visual Basic). However, only a conversion operator can be declared with Widening or Narrowing, but not both.

An operator definition can optionally include the Overloads and Shadows keywords. No other keywords are permitted in an Operator Statement.

Error ID: BC33019

To correct this error

  • Remove the Widening or Narrowing keyword from the operator definition. These do not apply, because no type conversion is taking place.

See Also

Tasks

How to: Define an Operator

How to: Define a Conversion Operator

Concepts

Operator Procedures

Reference

Operator Statement

Other Resources

Type Conversions in Visual Basic