Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion xml/System/ValueType.xml
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@
## Remarks
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.

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.
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.

> [!TIP]
> 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.
Expand Down