We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cc2bfc7 commit ce5f7e6Copy full SHA for ce5f7e6
Source/FikaAmazonAPI/Utils/Listing.cs
@@ -0,0 +1,22 @@
1
+using System.Collections.Generic;
2
+using System.Linq;
3
+
4
+namespace FikaAmazonAPI.Utils
5
+{
6
+ public static class Listing
7
+ {
8
+ public static IList<IList<T>> Slice<T>(IList<T> list, int number)
9
10
+ IList<IList<T>> objListList = new List<IList<T>>();
11
+ int num = list.Count / number;
12
+ if ((uint)(list.Count % number) > 0U)
13
+ ++num;
14
+ for (int index = 0; index <= num - 1; ++index)
15
16
+ IList<T> list1 = list.Skip<T>(index * number).Take<T>(number).ToList<T>();
17
+ objListList.Add(list1);
18
+ }
19
+ return objListList;
20
21
22
+}
0 commit comments