logical operators in csharp

Code Example - logical operators in csharp

                
                        int x=20;
Console.WriteLine("----- Logic Operators -----");
Console.WriteLine(x > 10)
                    
                
 

and operator in csharp

                        
                                # plz suscribe to my youtube channel -->
# https://www.youtube.com/channel/UC-sfqidn2fKZslHWnm5qe-A

int x=10, y=5;
Console.WriteLine("----- Logic Operators -----");
Console.WriteLine(x > 10 && y < 10);
                            
                        
 

or operator in csharp

                        
                                int x=15, y=5;
Console.WriteLine("----- Logic Operators -----");
Console.WriteLine(x > 10 || 100 > x);
                            
                        
 

and in csharp

                        
                                /* && would work only if both is true for example */ bool a = 1==2 && 1=< 2; // would be false 
/* but if they are both true it would be true */ bool a = 1==1 && 1==1; // would be true
                            
                        
 

csharp logical operators

                        
                                True
Second operand is evaluated
False