C# Judgment


  Translation results:

C# is a modern, general-purpose, object-oriented programming language developed by Microsoft and approved by Ecma and ISO.

C# was developed by Anders Hejlsberg and his team during the development of the .Net framework.

C# is designed for the Common Language Infrastructure (CLI). The CLI consists of executable code and a runtime environment that allows the use of a variety of high-level languages ​​on different computer platforms and architectures.

C# Judgmentsyntax

The judgment structure requires the programmer to specify one or more conditions to be evaluated or tested, as well as statements to be executed when the condition is true (required) and statements to be executed when the condition is false (optional).

C# Judgmentexample

using System;
namespace DecisionMaking{
​​
Class Program
{
        static void Main(string[] args)
                      
                    /* Local variable definition */
               int a = 10;
/*Use if statement to check Boolean conditions*/
If (a < 20)
                            
/*If the condition is true, output the following statements*/
Console.WriteLine("a is less than 20");
                              
             Console.WriteLine("The value of a is {0}", a);
             Console.ReadLine();
}
}}

Popular Recommendations

Home

Videos

Q&A