c#中出现名为“应为get或set访问器”的错误是什么意思?
我想问一下c#中出现名为“应为get或set访问器”的错误是什么意思?
程序如下
using System;
using System.Collections;
using System.Drawing;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
public class SpuareInt : System.Windows.Forms.Form
{
private System.Windows.Forms.Button calculateButton;
private System.Windows.Forms.Label outputLabel;
[STAThread]
static void Main
{
Application.Run(new SquareTnt());
}
int Square(int y)
{
return y*y;
}
private void calculateButton_Click(object sender,System.EventArgs e)
{
outputLabel.Text="";
for(int counter=1;counter<=10;counter++)
{
int result=Square(counter);
outputLabel.Text+="The Square of" + counter + "is" +result +"\n";
}
}
}
注释就是在Application那个地方点明的错误,谢谢,急用