   What's wrong with my code!?
  hi everyone! i'm trying to code a simply tile viewer. i have an image wich have to splited into 8x8 pixels tiles. here's the code i get so far:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;namespace Tiles{    public partial class Form1 : Form    {   public Form1()   {  InitializeComponent();   }   private void Form1_Load(object sender, EventArgs e)   {  int x, y,i,x_container,y_container;  PictureBox[] Arreglo = new PictureBox[16*8];    Bitmap Imagen = new Bitmap(@"D:\Pajaro\Programacion\Tiles\tileset.jpg");  Rectangle Rect;  x = y = 0;  x_container = y_container = 12;  for(i = 0;i < 10;i++)  { if ((i != 0) && (i % 8 == 0)) {x_container = 12;y_container += 18;y += 16; } PictureBox Contenedor = new PictureBox(); Contenedor.Location = new Point(x_container, y_container); Contenedor.Size = new Size(16, 16);  Rect = new Rectangle(x, y, x + 16, y + 16); Contenedor.Image = Imagen.Clone(Rect, System.Drawing.Imaging.PixelFormat.DontCare); this.Controls.Add(Contenedor); x_container += 18; x += 16;  }  Imagen.Dispose();   }    }}...but when start running the program the exception "Out of memory" comes out and i can't figure out why this happens. why is that exception thrown?thank you all in advance!   
  problem solved!the problem were here: Rect = new Rectangle(x, y, x + 16, y + 16);the correct way: Rect = new Rectangle(x, y, 16, 16);the problem was that i tried to specified the 4 corners of the rectangle, and the format of the overload is Rectangle(x, y, WIDTH, HEIGHT);   