Conversion operators cannot convert to Object

A conversion operator is declared with a return type of the Object Data Type.

At compile time, Visual Basic considers a predefined conversion to exist from any reference type to any type in its inheritance hierarchy, that is, any type from which it derives or which derives from it. Object is the universal data type in the .NET Framework, so every type derives from Object.

Because the compiler considers this conversion to be already defined, it does not allow you to redefine it.

Error ID: BC33028

To correct this error

  • Remove this operator definition entirely. It is already predefined.

See Also

Tasks

How to: Define an Operator

How to: Define a Conversion Operator

Concepts

Operator Procedures

Object as the Universal Data Type

Reference

Operator Statement