Conversion operators cannot convert from a type to the same type

A conversion operator is declared with the same type for both the parameter and the return.

It is not meaningful to convert from any type to itself.

Error ID: BC33024

To correct this error

  • Change the type of either the parameter or the return value. One of them must be of the type of the class or structure in which this operator is defined. The other must be of a different type.

  • If you need to perform a transformation on the contents of the parameter, use a Function Statement (Visual Basic) to define a Function procedure instead of an operator.

See Also

Tasks

How to: Define an Operator

How to: Define a Conversion Operator

Concepts

Operator Procedures

Reference

Operator Statement