title: How to convert a list of data contract class to an integer array in C#
body: <p>I am trying to convert a List of DataContract class to an integer array in C#.
  while I am trying to do this , I am getting the below error.</p>
  
  <blockquote>
    <p>error CS0411: The type arguments for method
    'System.Array.ConvertAll(TInput[], 
    System.Converter)' cannot be inferred from the usage. 
    Try specifying the type arguments explicitly.</p>
  </blockquote>
  
  <p>Could you please let me know how to resolve this error.
  "TopicDetails" is a data contract class which contains objects(strings)</p>
  
  <pre><code> List&lt;TopicDetails&gt; topicDetails3;
              TopicDetails[] arr = topicDetails3.ToArray();  
              int[] ints = Array.ConvertAll(arr,int.Parse);
  
  
  //topicDetails is a data-contract
  CreateSubscriptions&lt;List&lt;TopicDetails&gt;(topicDetails);
  
  //Here TopicDetails is a class (data contract) as follows.
  
  public class TopicDetails
  {
      protected object baseObjectType;  //string
      protected object topic;            //string
  
      public TopicDetails();
  
      [DataMember]
      public object BaseObjectType { get; set; }
      [DataMember]
      public object TopicID { get; set; }
  
      public static TopicDetails CreateTopic&lt;T, mT&gt;(IComparable&lt;T&gt; objectType, IComparable&lt;mT&gt; objectID);
  }
  </code></pre>