In Form1, how to get a value from Main()?
Hi,
In button1_Click(), how can I get "aValue" from Main(), somthing like:
static class Program
{
[STAThread]
static void Main()
{
int aValue = 1;
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDe...
Application.Run(new Form1());
}
}
public partial class Form1 : Form
{
private void button1_Click(object sender, EventArgs e)
{
Console.WriteLine("aValue = " + aValue);
}
}
I will appreciated for your code, I am a beginner.