Single equal sign is assignment.
Double equal is comparison.
You want comparison here because if
needs a bool
result.
PS: If you post a code snippet, ALWAYS USE CODE TAGS:
How to use code tags: Using code tags properly
Single equal sign is assignment.
Double equal is comparison.
You want comparison here because if
needs a bool
result.
PS: If you post a code snippet, ALWAYS USE CODE TAGS:
How to use code tags: Using code tags properly