using System; public class test { public static void Main(){ int[] starts = new int[6] {100,100,100,100,100,200}; foreach (int start in starts){ int limit=0; try{ for (int i=start; i<99999; i++){ Console.WriteLine("mira: {0}",i); byte[] b = new byte[i*1024*1024]; limit = i; } } catch{ Console.WriteLine("started at {0}, got to {1}", start, limit); } } } }