Skip to content

Commit 02f8401

Browse files
AaronRobinsonMSFTRon Petrusha
authored andcommitted
1 parent c940b28 commit 02f8401

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

xml/System/ValueType.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@
151151
## Remarks
152152
The <xref:System.ValueType.Equals%28System.Object%29?displayProperty=nameWithType> method overrides <xref:System.Object.Equals%28System.Object%29?displayProperty=nameWithType> and provides the default implementation of value equality for all value types in the .NET Framework.
153153
154-
If none of the fields of the current instance and `obj` are reference types, the <xref:System.ValueType.Equals%2A> method performs a byte-by-byte comparison of the two objects in memory. Otherwise, it uses reflection to compare the corresponding fields of `obj` and this instance.
154+
The default implementation calls <xref:System.Object.Equals%28System.Object%29?displayProperty=nameWithType> on each field of the current instance and `obj` and returns `true` if all fields are equal.
155155
156156
> [!TIP]
157157
> Particularly if your value type contains fields that are reference types, you should override the <xref:System.ValueType.Equals%28System.Object%29> method. This can improve performance and enable you to more closely represent the meaning of equality for the type.

0 commit comments

Comments
 (0)