J
Jay Willms
Hi!
In VB I was used to use the with-statement.
C# doesn't have one, so I tried the following:
namespace WindowsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
Form f = Form1;
f.button1.text = "Hi!";
}
}
}
But C# claims that there is no button1 on my Form1...
I think I do not reference Form1 correctly. Can somebody please tell me
how to do it correctly?
Thank you!
Jay
In VB I was used to use the with-statement.
C# doesn't have one, so I tried the following:
namespace WindowsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
Form f = Form1;
f.button1.text = "Hi!";
}
}
}
But C# claims that there is no button1 on my Form1...
I think I do not reference Form1 correctly. Can somebody please tell me
how to do it correctly?
Thank you!
Jay