Originally Posted by
Shaggy Hiker
Is the web service immutable? I would guess that it is, or else you could just have it create a B that inherits from A, cast it to type A, and return it. It would still be a B, so you would have no issue with casting it back to a B. Of course, that would mean that the service itself would change somewhat, which is probably not that good an idea. The service is exposing an A, and every consumer should take that A and do with it as they please. Having it secretly expose a B that has been cast to an A, and only having certain people know that it is actually a B and can be cast back to a B, would be kind of cheesy, though possible.