title: Dynamically create object with properties based on inputted List C#
body: <p>I have a method that takes in two arrays of integers as parameters. I want to dynamically create objects based on the input. So if user puts in [2,3] and [4,3,2],  I want to create 3 new Objects ( Friend2, Friend3 , Friend4).
  I have 2 issues I am stuck with:</p>
  
  <ul>
  <li>Dynamically creating multiple objects with different names based on list items</li>
  <li><p>Iterating through two lists and selecting only distinct values of both lists.</p>
  
  <pre><code>    static int maxTokens( int[] friends_from, int[] friends_to){
  
  **-- Need Code Here  to iterate through both arrays and create distinct objects**
  
  foreach (var Friend in  friends_from and  friends_To)
      {
          Friend  intFriend[i] = new Friend();
      }
    }
  </code></pre>
  
  <p>Is there a way to use Linq to (If not what is the best way to accomplish this?):</p></li>
  <li><p>Save myself from iterating through two lists adding both of them to a third list and selecting distinct</p></li>
  <li><p>dynamically create object with distinct Name based on listItem</p></li>
  </ul>