【发布时间】:2011-11-01 17:45:09
【问题描述】:
private void button6_Click(object sender, EventArgs e)
{
for (int i = 0; i < a.Length; i++)
{
MessageBox.Show(a[i]);
}
}
public void button7_Click(object sender, EventArgs e)
{
string[] a = { textBox1.Text};
}
【问题讨论】:
-
该错误表示您没有在“button6_Click”方法中声明“a”变量。注意:“button7_Click”中声明的“a”不可见