小编use*_*237的帖子

在声明中缺少部分修饰符..这种类型的另一部分声明存在".我是初学者,只是跟着这本书

我是初学者,我正在按照一本书做练习.下面是我的代码,我得到了这个

"Missing partial modifier on declaration of type 'Windowsform.Form1'; another partial declaration of this type exists".

我该怎么办?我的代码如下:

using System;
using System.Windows.Forms;

namespace Windowsform
{
    public class Form1 : Form
    {
       private TextBox txtEnter;
       private Label lblDisplay;
       private Button btnOk;

       public Form1()

       {
           this.txtEnter = new TextBox();
           this.lblDisplay = new Label();
           this.btnOk = new Button();
           this.Text = "My Hellowin app!";


           //txtEnter
           this.txtEnter.Location = new System.Drawing.Point(16, 32);
           this.txtEnter.Size = new System.Drawing.Size(264, 20);

           //lblDisplay
           this.lblDisplay.Location = new System.Drawing.Point(16, 72);
           this.lblDisplay.Size = …
Run Code Online (Sandbox Code Playgroud)

c# declaration partial winforms form-control

14
推荐指数
2
解决办法
6万
查看次数

标签 统计

c# ×1

declaration ×1

form-control ×1

partial ×1

winforms ×1