title: RetrieveMultiple using type parameter doesn't work
body: <p>For some reason, the following function works:</p>
  
  <pre><code>public EntityCollection RetrieveMultipleByIds(IOrganizationService service, string entityLogicalName, string[] columnSet, string idFieldName, string[] guids)
  {
      QueryExpression query = new QueryExpression(entityLogicalName);
      query.ColumnSet = new ColumnSet(columnSet);
      query.Criteria = new FilterExpression();
      query.Criteria.AddCondition(idFieldName, ConditionOperator.In, guids);
      EntityCollection entityCollection = service.RetrieveMultiple(query);
      return entityCollection;
  }
  </code></pre>
  
  <p>But this one - using type parameter - doesn't work:</p>
  
  <pre><code>public EntityCollection RetrieveMultipleByIds&lt;T&gt;(IOrganizationService service, string entityLogicalName, string[] columnSet, string idFieldName, T[] guids)
  {
       QueryExpression query = new QueryExpression(entityLogicalName);
       query.ColumnSet = new ColumnSet(columnSet);
       query.Criteria = new FilterExpression();
       query.Criteria.AddCondition(idFieldName, ConditionOperator.In, guids);
       EntityCollection entityCollection = service.RetrieveMultiple(query);
       return entityCollection;
  }
  </code></pre>
  
  <p>Both are called in the same way (Note that the literal-string guid is just for this example, and you can be assured the id i'm passing exists):</p>
  
  <pre><code>EntityCollection entityCollection =  
  RetrieveMultipleByIds("org_session", new string[] { "org_sessionname" }, "org_sessionid", new string[] {"73A5794E-1662-E711-80FF-005056B74623"});
  </code></pre>
  
  <p>And the exception thrown is:</p>
  
  <blockquote>
    <p>The formatter threw an exception while trying to deserialize the
    message: There was an error while trying to deserialize parameter
    <a href="http://schemas.microsoft.com/xrm/2011/Contracts/Services:query" rel="nofollow noreferrer">http://schemas.microsoft.com/xrm/2011/Contracts/Services:query</a>. The
    InnerException message was 'Error in line 1 position 2826. Element
    '<a href="http://schemas.microsoft.com/2003/10/Serialization/Arrays:anyType" rel="nofollow noreferrer">http://schemas.microsoft.com/2003/10/Serialization/Arrays:anyType</a>'
    contains data from a type that maps to the name 'System:String[]'. The
    deserializer has no knowledge of any type that maps to this name.
    Consider changing the implementation of the ResolveName method on your
    DataContractResolver to return a non-null value for name 'String[]'
    and namespace 'System'.'.  Please see InnerException for more details.</p>
  </blockquote>
  
  <p>I know there are similiar questions asking about this kind of exception, but none is related to using type parameters. If someone stumbled into the same issue and managed to find the problem and solve it, I'd be glad to hear about it.</p>