private void button1_Click(object sender, EventArgs e)
{
List< string > Names = new List < string > ();
Names.Add("James");
MessageBox.Show(Names[0]);
}
How can i use the Names in other forms or buttons?
I have tried
private void button2_Click(object sender, EventArgs e)
{
MessageBox.Show(Names[0]);
}
But i does not work
{
List< string > Names = new List < string > ();
Names.Add("James");
MessageBox.Show(Names[0]);
}
How can i use the Names in other forms or buttons?
I have tried
private void button2_Click(object sender, EventArgs e)
{
MessageBox.Show(Names[0]);
}
But i does not work







