title: Is there a simple way of creating a list of identical objects without using a loop?
body: <p>I currently have something like this:</p>
  
  <pre><code>public class Person
  {
      public string Firstname { get; set; }
  
      public string Lastname { get; set; }
  }
  
  public List&lt;Person&gt; CreatePersons(int numberOfPersons)
  {
      var persons = new List&lt;Person&gt;();
  
      for (int i = 0; i &lt; numberOfPersons; i++)
      {
          persons.Add(new Person())
      }
  
      return persons;
  }
  </code></pre>
  
  <p>I know that if I were to use an <code>array</code> then I could just do this:</p>
  
  <pre><code>var persons = new Person[numberOfPersons];
  </code></pre>
  
  <p>My question is:</p>
  
  <ul>
  <li>Is there a simple / direct way of creating a list of objects without using a loop?</li>
  </ul>
  
  <p>I guess that an array probably does the exact same thing internally as using a loop to create this array but with a different notation. But that's not a concern for now, for this question I'm just interested in a simpler notation.</p>