注册 登录
编程论坛 C# 论坛

C# 一个程序不能调试生成 请各位大侠帮 提出问题 并帮 忙修改

海洋彼岸 发布于 2015-01-07 20:26, 698 次点击
namespace selfexam
{
    public partial class PrimaryExmForm : Form
    {
        public PrimaryExmForm()
        {
            InitializeComponent();
        }

        private void radioButton1_CheckedChanged(object sender, EventArgs e)
        {

        }

        private void timer1_Tick(object sender, EventArgs e)
        {
        }
      
  
        public PrimaryExmForm()
        {
            InitializeComponent();
        }
        int ExamEecond = 0;

        private void timer1_Tick(object sender, EventArgs e)
        {
            ExamSecond++;
            this.ExamTime.Text = examsecond.ToString();

         }
      
      
           }
        private void btnGrade_Click(object sender, EventArgs e)
        {
         int Score = 0;
            if (this.Anwser1.text=="2000") score=score+10;
            if (this.Anwser21A.checked) score=score+10;
            if (this.Anwser22C.checked) score=score+10;
            if (this.Anwser23.text=="PasswordChar") score=score+10;
            if (this.Anwser24.text=="text") score=score+10;
            if (this.Anwser3A.checked && this.Anwser3B.checked && this.Anwser3C.checked && !this.Anwser3D.checked &&  ) score=score+10;
            this.timer1.Enablled=false ;
            this.bntGrade.Enabled= flase;
            this.TotalScore.Text = score.ToString();
        }

        private void bntClose_Click(object sender, EventArgs e)
        {
            this.Close;
        }
   
}
        错误    1    应输入 class、delegate、enum、interface 或 struct    D:\Documents\Visual Studio 2010\Projects\selfexam\primaryexmform.cs    44    17    selfexam
错误    2    应输入 class、delegate、enum、interface 或 struct    D:\Documents\Visual Studio 2010\Projects\selfexam\primaryexmform.cs    58    17    selfexam
2 回复
#2
Maick2015-01-08 09:55
1.检查{}是否对了.
2.构造函数重复了.
3.timer1_Tick()重复了.
#3
chenqi56242015-01-09 22:09
多了大括号,
先找本书看看基础的慢慢来,步子大了扯到蛋,这么基础的的
1