This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//CS Blazor WebAssembly Part: | |
public static class FileUtil | |
{ | |
public static IEnumerable<List<T>> Partition<T>(this IList<T> source, Int32 size) | |
{ | |
for (int i = 0; i < Math.Ceiling(source.Count / (Double) size); i++) | |
{ | |
yield return new List<T>(source.Skip(size * i).Take(size)); | |
} | |
} |