the 'or' operator not working? C#

Hi Guys/Girls,

I’m trying to write a simple if statement with an ‘or’ in it but can’t get it working? What have i done wrong?

  if(myVariable == 15||30||45){ 
//do something

myVariable is an int so i thought it would just work?


Try something like :

 if(myVariable == 15 || 
    myVariable == 30 ||
    myVariable == 45 )
 //do something


Really appreciate your answers guys! :wink: