"bitwise equality" with value types?

  • Thread starter Thread starter KJ
  • Start date Start date
K

KJ

Given a struct containing only primitive members, does "bitwise
equality" mean that it is not necessary to override Object Equals() or
the == operator when all you want to do is determine equivalence by
comparing the values of each primitive in the struct? The docs seem to
suggest this, but I would like a confirmation, if possible.

Thanks.

-KJ
 
Hi,

It's indeed the way it works, even if there is a reference type if both
structs have the same reference they will be equals
 
Back
Top