According to the documentation of the ==
operator in MSDN,
For predefined value types, the
equality
operator (==) returns true if
the values of its operands are equal,
false otherwise. For reference types
other than string, == returns true if
its two operands refer to the same
object. For the string type, ==
compares the
…