本帖最后由 ztdsg 于 2011-02-27 07:56:01 编辑

解决方案 »

  1.   

    死循环
    static void hello(int d,int e)
      {  
      return d * e ;
      }
     
      

  2.   

    static void hello(int d,int e)
      {  
      int c = d * e ;
      Console.WriteLine(c);
      hello(2,3);
        }这样就有输出了,不过不知道你到底想写个什么
    另外默认是从Main进入程序的,也就是说默认情况下你增加了hello方法,但是什么都没执行
    不知道你是不是设置了
      

  3.   

    你想 做什么?? Main方法里都没有调用,你的 hello(2,3); 是不是应该写到 入口Main函数里头。
      

  4.   

    Main 是主入口,你要在main中调用 hello才行
      

  5.   

    谢谢ls的了,其实我只是想随便试一下怎么调用方法= =b,已经可以了
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;namespace ConsoleApplication6
    {
        class Program
        {
            static int hello(int d,int e)
            {
                int c = d * e;
                return c;
            }        static void Main(string[] args)
            {
          
                Console.WriteLine("result is : " + hello (2,3)  );
            }
        }
    }