Udostępnij za pośrednictwem


Operator '<operator>' must have a second parameter of type 'Integer'

A bit-shift operator is declared with the second parameter of a type other than Integer.

When you use the right shift (>>) or left shift (<<) operator in an expression, you specify the shift amount in the second operand. For this operand, Visual Basic allows you to supply any data type that widens to Integer. However, the definition of the second operand is strictly Integer. If you define a class or structure with a bit-shift operator on that class or structure, your definition must specify Integer for the second operand.

Error ID: BC33041

To correct this error

  • Change the definition of the bit-shift operator to return an Integer value.

See Also

Tasks

How to: Define an Operator

How to: Define a Conversion Operator

Concepts

Operator Procedures

Reference

Operator Statement

Bit Shift Operators