检测到无法访问的代码result.?
private void button1_Click(object sender, EventArgs e){
string str_me = button1.Text;
ranm();
switch (str_guest)
{
case "石头": label2.Text = str_guest;
label5.Text = str_me;
label3.Text = "平"; break;
case "剪刀": label2.Text = str_guest;
label5.Text = str_me;
label3.Text = "赢"; break;
case "布": label2.Text = str_guest;
label5.Text = str_me;
label3.Text = "输"; break;
result = result + 1;
label7.Text = result.ToString(); break;
}
这是一部分石头剪刀布游戏的代码,执行过程说检测到无法访问的代码result是怎么回事?怎样解决呢?