== double-equals to test equality.
Thank you for saving me from my own stupidity
Also, a note for the future, pay more attention to error messages. The ones you see imply a conversion error, and conversion errors mostly occur when trying to assign a value to a variable which is not of the same type. Thus, you can take it as a hint that you’re trying to do assignment instead of comparison.


Thanks, also do you mind if I ask 1 more question?
Shouldn’t it be ‘==’ instead of ‘=’? Am not sure cuz I am newbie.
What happens if you type in $&fig at the prompt?
Why not use a switch statement instead?
C# devs
null reference exceptions

source