D
Dave
Why does the following code generate the error:
//The type or namespace name 'c' could not be found (are you missing a using
directive or an assembly reference?)
static void Main()
{
Application.Run(new Form1());
class1 c = new class1();
}
private void button1_Click(object sender, System.EventArgs e)
{
MessageBox.Show(c.x.ToString());
}
class class1
{
public int x;
}
//The type or namespace name 'c' could not be found (are you missing a using
directive or an assembly reference?)
static void Main()
{
Application.Run(new Form1());
class1 c = new class1();
}
private void button1_Click(object sender, System.EventArgs e)
{
MessageBox.Show(c.x.ToString());
}
class class1
{
public int x;
}