block list

/// <Summary>
/// large list of sub-blocks according to the number specified
/// </ Summary>
/// <typeParam name = "T"> generic </ typeParam>
/// <param name = " t "> original List </ param>
/// <param name =" NUM "> specifies the number of </ param>
/// <Returns> the nested block List </ Returns>
Private List <List <T ListToGroup >> <T> (List <T> T, int NUM = 1500)
{
List <List <T >> listGroup = new new List <List <T >> ();
int J = NUM;
for (int I = 0 ; I <t.Count (); I = NUM +)
{
List <T> = cplan new new List <T> ();
cplan = t.Take (J) .skip (I) .ToList ();
J + = NUM;
listGroup.Add (cplan);
}
return listGroup;
}

Guess you like

Origin www.cnblogs.com/request/p/12059795.html