none
tableau i dimension en c# avec vb2015

    Question

  • bonsoir

     un pas de plus fait avec mon programme j'ia enfin compris les tableaux

    ma question comment simplifier le remplissage de mon tableau cela fait 52 ligne sy aurait il une forme plus courte voici mon code

                pcbArray = new PictureBox[53];
    

     // on ajoute la picturebox dans le tableau
                pcbArray[0] = pic2;
                pcbArray[1] = pic3;
                pcbArray[2] = pic4;
                pcbArray[3] = pic5;
                pcbArray[4] = pic6;
                pcbArray[5] = pic7;
                pcbArray[6] = pic8;
                pcbArray[7] = pic9;
                pcbArray[9] = pic10;
                pcbArray[10] = pic11;
                pcbArray[11] = pic12;
                pcbArray[12] = pic13;
                pcbArray[13] = pic14;
                pcbArray[14] = pic15;
                pcbArray[15] = pic52;
                pcbArray[16] = pic16;
                pcbArray[17] = pic17;
                pcbArray[18] = pic18;
                pcbArray[19] = pic19;
                pcbArray[20] = pic20;
                pcbArray[21] = pic21;
                pcbArray[22] = pic22;
                pcbArray[23] = pic23;
                pcbArray[24] = pic24;
                pcbArray[25] = pic25;
                pcbArray[26] = pic26;
                pcbArray[27] = pic27;
                pcbArray[28] = pic28;
                pcbArray[29] = pic29;
                pcbArray[30] = pic30;
                pcbArray[31] = pic31;
                pcbArray[32] = pic32;
                pcbArray[33] = pic33;
                pcbArray[34] = pic34;
                pcbArray[35] = pic35;
                pcbArray[36] = pic36;
                pcbArray[37] = pic37;
                pcbArray[38] = pic38;
                pcbArray[39] = pic39;
                pcbArray[40] = pic40;
                pcbArray[41] = pic41;
                pcbArray[42] = pic42;
                pcbArray[43] = pic43;
                pcbArray[43] = pic43;
                pcbArray[44] = pic44;
                pcbArray[45] = pic45;
                pcbArray[46] = pic46;
                pcbArray[47] = pic47;
                pcbArray[48] = pic48;
                pcbArray[49] = pic49;
                pcbArray[50] = pic50;
                pcbArray[51] = pic51;
                pcbArray[51] = pic51;
                pcbArray[52] = pic53;
    
    

    jeudi 29 septembre 2016 22:07

Réponses