How I compare two picturebox array's? : I've been working on this app for long time. It has it's flaws, like, instead of using arrays, I could use 2d array, but it is difficult to get in the next row without messing somethings up. I have 6 arrays of pictureboxes on one side and same thing on other. On the bottom I have array of avaliable pictures that get be the right combination. The problem accured when I tried to compare the right combination with the one that user selected. Here is my code.

private void button1_Click(object sender, EventArgs e)
        {
            
            
                if (pb0.Image.ToString() == pb24.Image.ToString())
                {
                    nizKomb[0].Image = Image.FromFile(@"Slike\crvena.png");
                }

                if(pb1.Image.ToString() == pb25.Image.ToString())
            {
                nizKomb[1].Image = Image.FromFile(@"Slike\crvena.png");
            }
                if(pb2.Image.ToString() == pb26.Image.ToString())
            {
                nizKomb[2].Image = Image.FromFile(@"Slike\crvena.png");
            }
                if(pb3.Image.ToString() == pb27.Image.ToString())
            {
                nizKomb[3].Image = Image.FromFile(@"Slike\crvena.png");
            }

            

            btnOK2.Visible = true;
            ctrl = 1;
        }

        private void btnOK2_Click(object sender, EventArgs e)
        {
            for (int i = 0; i < 4; i++)
            {
                if (boxes2[i].Image.RawFormat == kombinacija[i].Image.RawFormat)
                {
                    nizKomb2[i].Image = Image.FromFile(@"Slike\crvena.png");
                }

            }

            if (boxes2[0].Image == null || boxes2[1].Image == null || boxes2[2].Image == null || boxes2[3].Image == null)
            {
                MessageBox.Show("Unesite kombinaciju.");
            }
            else if (boxes2[0].Image != null && boxes2[1].Image != null && boxes2[2].Image != null && boxes2[3].Image != null)
            {
                btnOK3.Visible = true;

                ctrl = 2;
            }
        }