Why is not the C # inequality operator! ==?

In C #, == used to verify equality, while = is used for assignment.

Does this mean that the check for inequality really should be !== .

Why is this not so? Oh, for historical reasons?

Raising != Showed that it was already installed in most SQL options now.

+4
source share
2 answers

C # had a big impact on Java and C / C ++, both of which use == and != . I suppose they simply decided to stick to the prevailing prevailing picture instead of reinventing the wheel. If you choose a different syntax, say === for equality and !=== , since inequality would be a stumbling block for the vast majority of developers that they aimed at

+10
source

== is simply synonymous with equality,! = is only one of the inequalities. It is just a synonym! This is not a logical expression, and therefore there is no need to follow any logical rules! Same thing with & =, | =, ^ = ...

This is not true! =====. Equals (true), this is just a name;)

+3
source

All Articles