Cause
This error occurs when the right-hand operand is of a type that cannot be assigned to the left-hand operand.
In general, the class of the right-hand side must be the same as, or a subclass of, the class of the left-hand side for composite (non-primitive) objects. For the rules for assignment compatibility for primitive objects, see "
When this error occurs for an array or dictionary subscript (using the bracket ([]) subscripting syntax), it indicates that the type of the subscript expression is not compatible with the corresponding key of the array or dictionary.
When this error occurs for the control variable of a
Action
Change the operands or their types so that the types are compatible. In some cases, it may be possible to add a type cast in order to make the operands compatible.