using System.Collections.Generic;
public static void Main()
var batches = Batchify( 453, 200);
Console.WriteLine(batches.Count);
foreach( Batch batch in batches )
Console.WriteLine("{0}-{1}", batch.Start, batch.End);
public static List<Batch> Batchify( int number, int size)
List<Batch> result = new List<Batch>();
int endIndex = running < size ? startIndex+running : startIndex+size-1;
result.Add(new Batch{ Start = startIndex, End = endIndex });
public int Start{get;set;}