本文介绍了它在第一个结束括号中显示“预期类型”。什么是哇?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

MY CODE:

MY CODE:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Banking_System
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new //Form1());      
             
               }   //in this bracket only
      }
}





我尝试过:



我没有得到确切的问题。这是来自我的Banking_System软件的program.cs代码。



What I have tried:

I didn't get the exact problem. This is program.cs code from my Banking_System software.

推荐答案

Application.Run(new //Form1());



因为


because

//Form1());



是评论。


is a comment.


Application.Run(new //Form1());   

注释已启动,但该语句不完整。



您应该删除 // 并且代码应该编译提供 Form1 确实存在。



如果这是不是这样,那么你必须用你的应用程序主表单的名称替换它。如果您只是使用 Form ,那么您将得到一个空的主窗体。

a comment is started but that statement is then incomplete.

You should remove the // and the code should compile provide that Form1 do exist.

If this is not the case, then you have to replace it with whatever is the name of your application main form. If you simply use Form, then you would get an empty main form.


Application.Run(new Form1());





如果你有重命名表单名称,然后你应该更新该行为



if you have renamed the Form Name, then you should update the line as

Application.Run(new YourNewFormName());





注意:这将是申请的起始形式。



note:This will be the starting form of your application.


这篇关于它在第一个结束括号中显示“预期类型”。什么是哇?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-01 19:18