当前位置:首页 > C#教程 > C#进阶

C#if运算符

using System;

namespace DecisionMaking {

   class Program {

      static void Main(string[] args) {
         /* local variable definition */
         int a = 10;

        /* check the boolean condition using if statement */
         if (a < 20) {
            /* if condition is true then print the following */
            Console.WriteLine("a is less than 20");
         }
         Console.WriteLine("value of a is : {0}", a);
         Console.ReadLine();
      }
   }
}

【说明】本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!