Skip to main content

Posts

Showing posts with the label C# if statements

If statement in C#

C# If statement If statement is one of the flow control and conditional statements in C# programming language. Control flows change the execution flow of a programming language. If someone for example, want to execute a particular statements based on some logic, then flow control and conditional statement come up. The if statement is used to evaluate a Boolean expression before executing a set of statements. The statements are run if the expression evaluate to true else it will run another statement. Syntax if(boolean expression) {     //statements to run } Code using system namespace csharpnaijaDemo {    class program    {       static void main(string[] args)       {            int value=10;            if(value <= 10)             {                   Consoile....