title: Converting type from a WCF service
body: <p>I'm sure this must be a pretty common problem. I have two WCF services, that basically expose standard access and admin access to one larger service.</p>
  
  <p>There is a similar method <code>Foo</code> on each service. <code>Foo</code> takes an argument of type <code>TemplateInfo</code> which is defined in my service.</p>
  
  <p>On my client I have a reference to <code>Client</code> and <code>AdminClient</code>. <code>Client.Foo(TemplateInfo)</code> expects <code>Client.TemplateInfo</code> while <code>AdminClient.Foo(TemplateInfo)</code> expects <code>AdminClient.TemplateInfo</code>. I know that once the service is reached <code>Client.TemplateInfo</code> and <code>AdminClient.TemplateInfo</code> are the same thing. </p>
  
  <p>I'm trying to figure out how to instantiate TemplateInfo and/or cast it to work with both client and admin methods. There is a decent amount of code to create this object so I was hoping not to duplicate that for each type.</p>
  
  <p>The types are defined in shared assemblies and I am "Reusing types" in my proxy. But I get the two different types because I have two service references.</p>
  
  <p>It would be great to do something like (AdminClient)TemplateInfo, but perhaps I'll create a clone method to convert the types.</p>