using System;
class Hello
{ public static void Main() 
{
Console.WriteLine("Hello, world");
}
} 程序如上所述,放到VS2003中,哪位比俺高的高手能否详细的指教下具体的生成文件的过程?我生成的文件的时候总是报"未定义入口点",搜索过相关的贴子,但都不能解决我的问题高手帮忙100分送上

解决方案 »

  1.   

    new一个控制台程序。using System;namespace ConsoleApplication1
    {
    /// <summary>
    /// Class1 的摘要说明。
    /// </summary>
    class Class1
    {
    /// <summary>
    /// 应用程序的主入口点。
    /// </summary>
    [STAThread]
    static void Main(string[] args)
    {
    //
    // TODO: 在此处添加代码以启动应用程序
    //
    Console.WriteLine("Hello, world");
    }
    }
    }
      

  2.   

    using System;namespace ConsoleApplication1
    {
    /// <summary>
    /// Class1 的摘要说明。
    /// </summary>
    class Class1
    {
    /// <summary>
    /// 应用程序的主入口点。
    /// </summary>
    [STAThread]
    static void Main(string[] args)
    {
    //
    // TODO: 在此处添加代码以启动应用程序
    //
    Console.WriteLine("Hello, world");
    }
    }
    }
      

  3.   

    晕,,我上面的程序不行么?一个网友帮我测试可以的而且还生成了exe文件能否详细说明一下?
      

  4.   

    Main  方法是需要参数的
      

  5.   

    C#学习笔记(一)-- 入门的困惑     选择自 deng2001 的 Blog 
    http://dev.csdn.net/article/73137.shtm
      

  6.   

    【文件】->【新建】->【项目】->【Visual c#项目】->【控制台应用程序】
    再把你代码拷进去就OK了
      

  7.   

    程序没有问题,可以执行
    方法如下:
    在某一路径(比如D盘)下创建一个文本文件,打开将你的代码复制到文件中,然后保存,该文件名为"hello.cs"然后运行“Visual Studio .NET2003命令提示”,具体方法如下:开始菜单->程序->
    Microsoft Visual Studio.NET2003->Visual Studio.NET工具->Visual Studio .NET2003命令提示这个和dos一样,切换到你刚才的文件的路径(我在前面保存在D盘),运行编译命令csc:
    d:\csc hello.cs    //回车执行。csc 为c#的编译命令,后面为你的源代码文件
    有错误就改,没有错误,就会在源代码路径下生成一个和源代码同名的exe文件,执行就可以了
    d:\hello  //回车执行
    输出:
    hello,world
      

  8.   

    大家来我的QQ群里讨论吧!C#.NET 开发,主群:10086663本群已满人了,
    要加入,请加分群9715298!