悬赏分:20 浏览:517 次
我编了一段程序 下面是代码:using System;
using System.Drawing;
using System.ComponentMoel;
using System.Data;
using System.Drawing;
using System.Windows.Forms;
using System.Bank;
namespace ATM
{
partial class Form1:System.Windows.Forms.Form
{ private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Button button3;
private System.Windows.Forms.Button button4;
private System.Windows.Forms.Button button5;
private System.Windows.Forms.Button button6;
private System.Windows.Forms.Button button7;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.Button button8;
private System.Windows.Forms.RichTextBox richTextBox1;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox textBox3;
private System.Windows.Forms.Button button9;
private bool IsVefified;
private bool IsWithdraw;
private bool IsDeposit;
private bool IsTransfer;
private bool IsUpdatePwd;
private bool IsTransfering;
private string TransferCardNo;
private decimal TransferAmount;
private Bank.Bank bank;
private System.ComponentModel.Container Components=null;
public Form1()
{
InitializeComponrnt();
IsVerifed=false;
IsWithdraw=false;
IsDeposit=false;
IsTransfer=false;
IsUpdatePwd=false;
IsTransfering=false;
bank=new Bank.Bank();
}
protected override void Dispose( bool disposing)
{
if (components !=null)
{
components.Dispose();
}
}
base.Dispose(dispoing);
}
#region Windows Form Designer generated code
private void InitializeComponent()
#endregion
[STAThread]
static void main()
{
Application.Run (new Form1());
}
}
但总是出现错误 错误提示是:警告 1 类名“?”不是该语言的有效标识符。 0 0
错误 2 类、结构或接口成员声明中的标记“base”无效 d:\My Documents\Visual Studio 2008\Projects\Project1\ATM\ATM\Form1.cs 60 9 ATM
错误 3 方法必须具有返回类型 d:\My Documents\Visual Studio 2008\Projects\Project1\ATM\ATM\Form1.cs 60 14 ATM
错误 4 应输入标识符 d:\My Documents\Visual Studio 2008\Projects\Project1\ATM\ATM\Form1.cs 60 30 ATM
错误 5 应输入 class、delegate、enum、interface 或 struct d:\My Documents\Visual Studio 2008\Projects\Project1\ATM\ATM\Form1.cs 64 13 ATM
错误 6 应输入 class、delegate、enum、interface 或 struct d:\My Documents\Visual Studio 2008\Projects\Project1\ATM\ATM\Form1.cs 67 12 ATM
错误 7 应输入 class、delegate、enum、interface 或 struct d:\My Documents\Visual Studio 2008\Projects\Project1\ATM\ATM\Form1.cs 69 27 ATM
错误 8 应输入类型、命名空间定义或文件尾 d:\My Documents\Visual Studio 2008\Projects\Project1\ATM\ATM\Form1.cs 71 1 ATM
我不知该怎么改正,求大家帮忙,谢谢!!
|
上面的代码是你写的?怎么看都是IDE自动生成的啊~~~~
代码好乱,不知道楼主的代码是不是2003转过来的,鉴于代码很简单,几个控件拖到设计器上就行了,建议:删除这个Form,重做一遍 呵呵,一般情况下,出现这样的问题,可以断定,有以下两种情况: 1. 你的某些代码中使用了全角字符。 比如,把";"写成了";". 2. 你使用了不匹配的{} 3. 你使用了不匹配的#region 排查问题的最简单的方法,打开那个文件,从上向下浏览文件。找到第一个出错的点(有一个红色的波浪线)。往往,错误的根本就在这一行的附近。 |