>That makes no sense to me. If you are assigning to a type of ClientAPI.ClientService.Client then the result must be of that type (or derived from it). In your code that would not be the case. Can you post enough code to show a working example....
You are right. After having tested that, it is only in run time that it generated an error.