[已解决问题] 一个c#错误的问题 求大家帮忙 急!!!
提问时间: 2008-06-29 17:12
悬赏分: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
我不知该怎么改正,求大家帮忙,谢谢!!
 

提问者:chengxu - 初学一级
最佳答案
protected override void Dispose( bool disposing) { if (components !=null) { components.Dispose(); } } base.Dispose(dispoing); base.Dispose(dispoing);这一句应该放在Dispose方法内。
2008/6/29 22:06:50 回答者:李潘


提问者对于答案的评价:谢谢啊
其它回答(3)
上面的代码是你写的?怎么看都是IDE自动生成的啊~~~~
3个月前   回答者:电机拖动 - 小虾三级
代码好乱,不知道楼主的代码是不是2003转过来的,鉴于代码很简单,几个控件拖到设计器上就行了,建议:删除这个Form,重做一遍
3个月前   回答者:MiniThi@k - 菜鸟二级
呵呵,一般情况下,出现这样的问题,可以断定,有以下两种情况: 1. 你的某些代码中使用了全角字符。 比如,把";"写成了";". 2. 你使用了不匹配的{} 3. 你使用了不匹配的#region 排查问题的最简单的方法,打开那个文件,从上向下浏览文件。找到第一个出错的点(有一个红色的波浪线)。往往,错误的根本就在这一行的附近。
3个月前   回答者:Colin Han - 老鸟四级
评论
   您需要登录以后才能回答!
 

我要提问

我的问题


快到期问题

> 问题排行榜

相关内容

相关链接