此名称'_form1'在当前上下文中不存在

时间:2016-09-09 10:50:00

标签: c# .net winforms

namespace WindowsApplication

public partial class Form1: Form
{
    public Form1()
    {
        InitializeComponent();
        _Form1 = this;
    }    
}

错误:当前上下文中不存在名称“_Form1”

1 个答案:

答案 0 :(得分:-1)

你忘了申报_Form1:

Form1 _Form1;
_Form1 = this;