Ithinkit'sabugnotinthecode,butinthecompiler...
WhenIeatthiscodearea,theerroralwaysgoestothenextvariable,ormethod.
See:
Partofthecode:
grpBoxMDeck[i]=newSystem.Windows.Forms.GroupBox(){Location=newSystem.Drawing.Point(76,yG),Size=newSystem.Drawing.Size(536,340),BackColor=System.Drawing.Color.Transparent,ForeColor=corLetra,Font=newSystem.Drawing.Font(Font.FontFamily,8.25f,System.Drawing.FontStyle.Bold),Text=string.Format("Elixir Médio: {0:f1} - Arena {1}+", elixirMedio, decks[i].Split('|')[1]).Replace(',', '.')
};
grpBoxMDeck[i].Click += (s, e) => pMelhoresDecks.Select();
grpBoxMDeck[i].ContextMenuStrip = cmsGBMDecks[i];
picImagemMDecks[i] = new System.Windows.Forms.PictureBox[8];
byte x1 = 3, x2 = 3;
for (byte j = 0; j < picImagemMDecks.Length; j++)
{
byte copiaJ = j;
picImagemMDecks[i][j] = new System.Windows.Forms.PictureBox()
{
Size = new System.Drawing.Size(131, 157),
SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage,
BackColor = System.Drawing.Color.Transparent
};
if (j < 4) { picImagemMDecks[i][j].Location = new System.Drawing.Point(x1, 15); x1 += 133; }
else { picImagemMDecks[i][j].Location = new System.Drawing.Point(x2, 174); x2 += 133; }
grpBoxMDeck[i].Controls.Add(picImagemMDecks[i][j]);
}
pMelhoresDecks.Controls.Add(grpBoxMDeck[i]);
Any solution to this bug ? It appeared out of nowhere, the code was running normally, even this last line:
pMelhoresDecks.Controls.Add(grpBoxMDeck[i]);
Now it does not even run. I've tried closing and opening Visual Studio and nothing!