Skip to content

Commit e2d15b9

Browse files
author
Quintus Marais
authored
Add missing space
Removed the space from incorrect position and added it to correct position between "virtual.md)" and "<xref:"
1 parent 07564c6 commit e2d15b9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/csharp/programming-guide/statements-expressions-operators/how-to-define-value-equality-for-a-type.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ When you define a class or struct, you decide whether it makes sense to create a
5454

5555
The implementation details for value equality are different for classes and structs. However, both classes and structs require the same basic steps for implementing equality:
5656

57-
1. Override the [virtual] (../../../csharp/language-reference/keywords/virtual.md)<xref:System.Object.Equals%28System.Object%29?displayProperty=fullName> method. In most cases, your implementation of `bool Equals( object obj )` should just call into the type-specific `Equals` method that is the implementation of the <xref:System.IEquatable%601?displayProperty=fullName> interface. (See step 2.)
57+
1. Override the [virtual](../../../csharp/language-reference/keywords/virtual.md) <xref:System.Object.Equals%28System.Object%29?displayProperty=fullName> method. In most cases, your implementation of `bool Equals( object obj )` should just call into the type-specific `Equals` method that is the implementation of the <xref:System.IEquatable%601?displayProperty=fullName> interface. (See step 2.)
5858

5959
2. Implement the <xref:System.IEquatable%601?displayProperty=fullName> interface by providing a type-specific `Equals` method. This is where the actual equivalence comparison is performed. For example, you might decide to define equality by comparing only one or two fields in your type. Do not throw exceptions from `Equals`. For classes only: This method should examine only fields that are declared in the class. It should call `base.Equals` to examine fields that are in the base class. (Do not do this if the type inherits directly from <xref:System.Object>, because the <xref:System.Object> implementation of <xref:System.Object.Equals%28System.Object%29?displayProperty=fullName> performs a reference equality check.)
6060

0 commit comments

Comments
 (0)