Free cookie consent management tool by TermsFeed Policy Generator

Changes between Initial Version and Version 1 of Ticket #1137, comment 3


Ignore:
Timestamp:
08/07/10 12:13:43 (14 years ago)
Author:
svonolfe
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #1137, comment 3

    initial v1  
    1 I agree to the point that IntValues should not be regarded as value types considering your argument. When regarding IntValues as reference types, the msdn recommendation is not applicable in that case (it refers to value types).
     1I agree to the point that IntValues should not be regarded as value types (i.e. not implemented as structs) considering your argument. When regarding IntValues as reference types, the msdn recommendation is not applicable in that case (it refers to value types).
    22
    33However, if you think about boxing and unboxing Equals returns true when value types are converted to reference types, isn't that what those wrappers in HL do?
     
    99}}}
    1010
    11 If Equals and GetHashCode would be overwritten, two IntValues would not be the same object (identical), they would be equal if we consider them as reference types.
     11If Equals and GetHashCode would be overwritten, two IntValues with the same primitive value would not be the same object (identical), they would be equal implemented as reference types.