Skip to main content
Post Made Community Wiki
Source Link
Guffa
  • 3k
  • 22
  • 16

You should definitely stop this bad habit. Gently...

It's easy to forget to write the double equal signs, turning the code into:

if (someBool = true)

In C# for example this will only produce a warning, not an error. So unless you treat warnings as errors the code will run, set the variable to true and always enter the condition.