Hello my name is parsa and I'm a c# programmer i want to use comparison operators continuous for example imagine we have three Variables named V1,V2,V3 each of them is equal to a random number between 1 and 4 then we want to see are they equal together and are they equal to 3 ? we have to use this code
if(V1 == V2 && V1 == V3 && V1 == 3)
//body
if i want to use it such as this this it will be get me a error !
if(V1 == V2 == V3 == 3)
//body
can i use it such as code i wrote ?
Aucun commentaire:
Enregistrer un commentaire