TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Dave
NA
48
24k
In Form1, how to get a value from Main()?
Dec 7 2013 11:11 AM
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.
Reply
Answers (
6
)
Not able to call method
FileStream Write/Read