c# - Is it possible with Fixture to create a list of N objects? -


I want to make a list of fixture n objects.

I know that I can accompany it:

  list & lt; Person & gt; Person = new list & lt; Person & gt; (); (Person = add; i; lt; number for propriens; i ++) for (person = stability. Build & gt; person & gt; (). Create (); persons.Add (person);}  CreateMany ()  method or some other method to avoid the loop?   < P> 

You can use linq:

  list & lt; person & gt; person = numeric Select Category (0, Numberoffs). Select (x => Stability Build. (Build) .toList ();    

Comments

Popular posts from this blog

Out of index C/C++ -

algorithm - Graph cut with python: How to set up the graph correctly? -

objective c - how Set autolayout for multiple dynamic buttons and labells in iOS? -