C# : if loop single operator , double operator : Part 18
- Using single operator will check all consition if first one is true.
 - Using double operator in if loop will not check other consition if first one or previous one is true
 
 if (a == 1 | a == 2)  
 {  
    //Do something  
 }  
 if (a == 1 || a == 2)  
 {  
    //Do something  
 }  
No comments