• 预处理指令


    /*
      Example4_17.cs illustrates the use of the
      #undef, #elif, and #else preprocessor directives
    */

    #define DEBUG
    #undef DEBUG
    #define PRODUCTION

    class Example4_17
    {

      public static void Main()
      {

        int total = 0;
        int counter = 0;

        myLabel:
        counter++;
        total += counter;
        System.Console.WriteLine("counter = " + counter);
        if (counter < 5)
        {
    #if DEBUG
          System.Console.WriteLine("goto myLabel");
    #elif PRODUCTION
          System.Console.WriteLine("counter < 5");
    #else
          System.Console.WriteLine("goto myLabel, counter < 5");
    #endif
          goto myLabel;
        }

        System.Console.WriteLine("total = " + total);

      }

    }

  • 相关阅读:
    处理图片
    打死都不放手
    美白
    词云
    太阳花绘制
    测评软件Lemon教程
    --解释?说明:--
    T1 数字配对 题解
    P1100 高低位交换
    P1143 进制转换
  • 原文地址:https://www.cnblogs.com/djcsch2001/p/2035676.html
Copyright © 2020-2023  润新知