首页 > 解决方案 > Visual Studio 2017 表单

问题描述

再会

我正在 VS2017 中开发一个 Windows 应用程序表单,但是我收到以下错误“无法分配给 txtEmail,因为它是一个方法组”

“EmployeeRquestFormUI.txtEmail() 是一种在给定上下文中无效的方法”

代码可能有什么问题:请参阅下面的代码

employeeRequestFormUI.txtJob_Desc = new System.Windows.Forms.TextBox();
employeeRequestFormUI.txtEmail = new System.Windows.Forms.TextBox();
employeeRequestFormUI.txtTelExt = new System.Windows.Forms.TextBox();
employeeRequestFormUI.txtRequestedBy = new System.Windows.Forms.TextBox();
employeeRequestFormUI.radioLaptop = new System.Windows.Forms.RadioButton();
employeeRequestFormUI.radioDesktop = new System.Windows.Forms.RadioButton();
employeeRequestFormUI.txtDepartment = new System.Windows.Forms.ComboBox();
employeeRequestFormUI.richTextBox1 = new System.Windows.Forms.RichTextBox();

标签: c#winforms

解决方案


寻找

EmployeeRquestFormUI.txtEmail()

并取下大括号

EmployeeRquestFormUI.txtEmail

推荐阅读