in former times ( ;) ) it was possible to set an index picturebox(1); picturebox(2);...
but now - in C#?
Is there anything similar?
Thanks a lot
CS
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
VulpesRank #55 · 29.2K reputationPosted Jan 30, 2015, 9:01 AM EST
Christoph Sattler5 reputationPosted Jan 31, 2015, 6:06 AM EST
thats exactly what I needed.
One more question: this is ok:
public partial class Form1 : Form
{
int z;
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
PictureBox[] pb = {pictureBox1,pictureBox2,pictureBox3,pictureBox4,pictureBox5};
pb[0].Visible = false;
}
}
}
but if I use the line:
PictureBox[] pb = {pictureBox1,pictureBox2,pic....
above : public Form1()
like int z; as a global or public variable it seems not to be allowed?!
CS
VulpesRank #55 · 29.2K reputationPosted Jan 31, 2015, 8:48 AM EST
Christoph Sattler5 reputationPosted Feb 2, 2015, 7:21 AM EST
CS