I have listBox1 but when I am using that listBox1 inside the buttonClick I can access but outside the buttonClick I can't access . Where I am doing mistakes ? Thanks
namespace design
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button4_Click(object sender, EventArgs e)
{
listBox1.Items.Add(button1.Text);// I can access listBox1 here...
}
listBox1.//I can't access listBox1 here....
}
}