如下一个非常简单的c#程序,为什么在我的vs2005 中不能调试,不能点击调试按钮?
如何做到就像vc6.0 那样一个单独的程序也能调试和运行?谢谢
using System;namespace Wrox.ProCSharp.Basics
{
   public class ScopeTest
   {
      public static int Main()
      {
         for (int i = 0; i < 10; i++)
         {
            Console.WriteLine(i);
         }   // i goes out of scope here         // We can declare a variable named i again, because
         // there's no other variable with that name in scope
         for (int i = 9; i >= 0; i--)
         {
            Console.WriteLine(i);
         }   // i goes out of scope here
         return 0;
      }

解决方案 »

  1.   

    没有……
    为什么我的c#文件不能运行和调试,,我把.cs的文件打开后,vs2005 的调试按钮不能点击。
      

  2.   

    你是单独一个cs文件,还是有一个项目呢,单个cs当然运行不了
      

  3.   

    在做BS网站开发的时候在文件上面右键有一个 生成页CS的程序没有 这个
      

  4.   

    单独的~~如何才能运行,,
    比如把下面这个文件,想执行出来他的结果,怎么办
    using System;namespace Wrox.ProCSharp.Basics
    {
      public class ScopeTest
      {
      public static int Main()
      {
      for (int i = 0; i < 10; i++)
      {
      Console.WriteLine(i);
      } // i goes out of scope here  // We can declare a variable named i again, because
      // there's no other variable with that name in scope
      for (int i = 9; i >= 0; i--)
      {
      Console.WriteLine(i);
      } // i goes out of scope here
      return 0;
      }
      

  5.   

    创建一个c#解决方案,然后添加类,然后把上面namespace中的内容都拷贝到类里面。public class ScopeTest
      {
      public static int Main()
      {
      for (int i = 0; i < 10; i++)
      {
      Console.WriteLine(i);
      } // i goes out of scope here  // We can declare a variable named i again, because
      // there's no other variable with that name in scope
      for (int i = 9; i >= 0; i--)
      {
      Console.WriteLine(i);
      } // i goes out of scope here
      return 0;然手生成、调试就应该都可以了。
      

  6.   


    还是用csc,简单的文件调试个什么劲