vendredi 27 novembre 2020

C# how many brackets do you need for an if x or y statement?

If I have an if statement, like so, that is fully fuctional;

if (condition1 == 1 || condition2 == 2)

Why do so many people do it like this? Is there some reason for this other than just their code style?

if ((condition1 == 1) || (condition2 == 2))

Aucun commentaire:

Enregistrer un commentaire