C#编好一段程序后 不能生成调试 请指出问 并修改
usingSystem;usingSystem.Collections.Generic;usingSystem.ComponentModel;usingSystem.Da...
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
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;
}
}
}
}
}
错误 2 应输入 class、delegate、enum、interface 或 struct D:\Documents\Visual Studio 2010\Projects\selfexam\primaryexmform.cs 59 17 selfexam
错误 3 应输入类型、命名空间定义或文件尾 D:\Documents\Visual Studio 2010\Projects\selfexam\primaryexmform.cs 65 9 selfexam
错误 4 应输入类型、命名空间定义或文件尾 D:\Documents\Visual Studio 2010\Projects\selfexam\primaryexmform.cs 66 5 selfexam
错误 5 应输入类型、命名空间定义或文件尾 D:\Documents\Visual Studio 2010\Projects\selfexam\primaryexmform.cs 67 1 selfexam
错误 6 当前上下文中不存在名称“ExamSecond” D:\Documents\Visual Studio 2010\Projects\selfexam\primaryexmform.cs 37 13 selfexam
错误 7 当前上下文中不存在名称“examsecond” D:\Documents\Visual Studio 2010\Projects\selfexam\primaryexmform.cs 38 34 selfexam 展开
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
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;
}
}
}
}
}
错误 2 应输入 class、delegate、enum、interface 或 struct D:\Documents\Visual Studio 2010\Projects\selfexam\primaryexmform.cs 59 17 selfexam
错误 3 应输入类型、命名空间定义或文件尾 D:\Documents\Visual Studio 2010\Projects\selfexam\primaryexmform.cs 65 9 selfexam
错误 4 应输入类型、命名空间定义或文件尾 D:\Documents\Visual Studio 2010\Projects\selfexam\primaryexmform.cs 66 5 selfexam
错误 5 应输入类型、命名空间定义或文件尾 D:\Documents\Visual Studio 2010\Projects\selfexam\primaryexmform.cs 67 1 selfexam
错误 6 当前上下文中不存在名称“ExamSecond” D:\Documents\Visual Studio 2010\Projects\selfexam\primaryexmform.cs 37 13 selfexam
错误 7 当前上下文中不存在名称“examsecond” D:\Documents\Visual Studio 2010\Projects\selfexam\primaryexmform.cs 38 34 selfexam 展开
1个回答
展开全部
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace selfexam
{
public partial class PrimaryExmForm : Form
{
public PrimaryExmForm()
{
InitializeComponent();
}
private void radioButton1_CheckedChanged(object sender, EventArgs e)
{
}
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;
}
}
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询