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

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -