A get or set accessor excpted 哪里错了?
namespace WindowsFormsApplication31{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
string[] major, course1, course2, course3, course4, course5;
string gr, xy, msg;
private bool checkGR()
{
bool check = true;
if (txtAge.Text.Trim() == "" || txtName.Text.Trim() == "")
{
check = false;
MessageBox.Show("姓名和年龄必须填写!");
}
return check;
}
private string record
{
gr =""; //这个地方提示A get or set accessor excpted 后面就一直不能缩进 我也不知道哪里错了 求助啊
gr += txtName.Text.Trim();
if (radMale.checked)
gr += ",男,";
else
gr+=",女,";
gr+=""
}
}
}