Please be patient with me, I am new to C# and I am trying my best
so my question is, when we create a button in windows form app (wfa), there is a private event automatically created if you double click the button.
let's say we have 2 buttons (btn1 & btn2) btn1 click event has variable of type string called access and I need to call this variable in btn2 click event
so how we will pass the info from a private event to another ! enter image description here
private void button1_Click(object sender, EventArgs e)
{
string access1 = "access 1";
}
private void button2_Click(object sender, EventArgs e)
{
string access2 = access1;
}