illegal cast from 'type1' to 'type2'
A type used in a cast operation was not legal for this expression.