Dynamic cast failed.

#6137   Run-time catchable error

Dynamic cast failed.

Additional Information

Type 'X' cannot be cast to 'Y'.

Explanation

The cast has failed at run-time, because the run-time type of the value on the right-hand side of cast is not a sub-type of the type on its left-hand side.