foreach (PictureBox picture in panel1.Controls)
{
if (count == 12)
{
break;
}
count = count + 1;
picture.Enabled = false;//disable clicking card
points.Add(picture.Location);//card location in the panel
}
There are 24 picture boxes, I only want to allocate the position of the first 12 picture boxes. Is there any ways can be used like for loop?