c sharp or operator in if statement

Code Example - c sharp or operator in if statement

                
                        //You can't just use:
if (5 == 5 || 6) { ERROR }
//With the || being the OR.

//You have to say:
if (5 == 5 || 6 == 6) { WORKED }

//Hope that helped! :)
                    
                
 

or in if statement csharp

                        
                                if (title == "User greeting" || "User name") 
{
  do stuff
}
                            
                        
 

Related code examples