In the original code,
sim.Add(fare);
fare.Clear();
the list that was just added to sim is cleared, therefore the data are lost.
If you execute sim.Add(fare.ToList( )), a new list is created by ToList, which is a copy of fare; it is also added to sim. Therefore, fare.Clear does not clear the added list.
Two lists having the same data will exist for a short period of time. It is more efficient to do something like this:
for( int s = 0; s < sims; s++)
{
List<Chickens> fare= new List<Chickens>( );
for( int b = 0; b < sa; b++)
{
. . .
}
sim.Add( fare);
}
In this code:
List<Chickens> fare2 = new List<Chickens>();
fare2 = fare;
sim.Add(fare2)
fare.Clear();
a new empty list is created, but then fare2 is repointed to the list that is referenced by fare. The new list is lost. Both of fare2 and fare now represents the same list object, because fare2=fare does not create a copy of the list. Then fare.Clear deletes the data (similar to fare2.Clear). This is not suitable.