IEquatable<T> IEquatable<T> IEquatable<T> IEquatable<T> Interface
Definition
Defines a generalized method that a value type or class implements to create a type-specific method for determining equality of instances.
generic <typename T>
public interface class IEquatable
public interface IEquatable<T>
type IEquatable<'T> = interface
Public Interface IEquatable(Of T)
Type Parameters
- T
The type of objects to compare.
- Derived
-
Microsoft.Build.Evaluation.ProjectMetadataMicrosoft.Build.Evaluation.ProjectMetadataMicrosoft.Build.Evaluation.ProjectMetadataMicrosoft.Build.Evaluation.ProjectMetadataMicrosoft.Build.Evaluation.ProjectPropertyMicrosoft.Build.Evaluation.ProjectPropertyMicrosoft.Build.Evaluation.ProjectPropertyMicrosoft.Build.Evaluation.ProjectPropertyMicrosoft.Build.Execution.ProjectMetadataInstanceMicrosoft.Build.Execution.ProjectMetadataInstanceMicrosoft.Build.Execution.ProjectMetadataInstanceMicrosoft.Build.Execution.ProjectMetadataInstanceMicrosoft.Build.Execution.ProjectPropertyInstanceMicrosoft.Build.Execution.ProjectPropertyInstanceMicrosoft.Build.Execution.ProjectPropertyInstanceMicrosoft.Build.Execution.ProjectPropertyInstanceMicrosoft.Build.Utilities.TargetPlatformSDKMicrosoft.Build.Utilities.TargetPlatformSDKMicrosoft.Build.Utilities.TargetPlatformSDKMicrosoft.Build.Utilities.TargetPlatformSDKMicrosoft.VisualBasic.Activities.VisualBasicImportReferenceMicrosoft.VisualBasic.Activities.VisualBasicImportReferenceMicrosoft.VisualBasic.Activities.VisualBasicImportReferenceMicrosoft.VisualBasic.Activities.VisualBasicImportReferenceSystem.TimeZoneInfo.AdjustmentRuleSystem.TimeZoneInfo.AdjustmentRuleSystem.TimeZoneInfo.AdjustmentRuleSystem.TimeZoneInfo.AdjustmentRuleSystem.TimeZoneInfo.TransitionTimeSystem.TimeZoneInfo.TransitionTimeSystem.TimeZoneInfo.TransitionTimeSystem.TimeZoneInfo.TransitionTimeSystem.ValueTuple<T1,T2,T3>System.ValueTuple<T1,T2,T3>System.ValueTuple<T1,T2,T3>System.ValueTuple<T1,T2,T3>System.ValueTuple<T1,T2,T3,T4>System.ValueTuple<T1,T2,T3,T4>System.ValueTuple<T1,T2,T3,T4>System.ValueTuple<T1,T2,T3,T4>System.ValueTuple<T1,T2,T3,T4,T5>System.ValueTuple<T1,T2,T3,T4,T5>System.ValueTuple<T1,T2,T3,T4,T5>System.ValueTuple<T1,T2,T3,T4,T5>System.ValueTuple<T1,T2,T3,T4,T5,T6>System.ValueTuple<T1,T2,T3,T4,T5,T6>System.ValueTuple<T1,T2,T3,T4,T5,T6>System.ValueTuple<T1,T2,T3,T4,T5,T6>System.ValueTuple<T1,T2,T3,T4,T5,T6,T7>System.ValueTuple<T1,T2,T3,T4,T5,T6,T7>System.ValueTuple<T1,T2,T3,T4,T5,T6,T7>System.ValueTuple<T1,T2,T3,T4,T5,T6,T7>System.ValueTuple<T1,T2,T3,T4,T5,T6,T7,TRest>System.ValueTuple<T1,T2,T3,T4,T5,T6,T7,TRest>System.ValueTuple<T1,T2,T3,T4,T5,T6,T7,TRest>System.ValueTuple<T1,T2,T3,T4,T5,T6,T7,TRest>System.Activities.BookmarkSystem.Activities.BookmarkSystem.Activities.BookmarkSystem.Activities.BookmarkSystem.Activities.BookmarkScopeSystem.Activities.BookmarkScopeSystem.Activities.BookmarkScopeSystem.Activities.BookmarkScopeSystem.Activities.WorkflowIdentitySystem.Activities.WorkflowIdentitySystem.Activities.WorkflowIdentitySystem.Activities.WorkflowIdentitySystem.Buffers.StandardFormatSystem.Buffers.StandardFormatSystem.Buffers.StandardFormatSystem.Buffers.StandardFormatSystem.Collections.Immutable.ImmutableArray<T>System.Collections.Immutable.ImmutableArray<T>System.Collections.Immutable.ImmutableArray<T>System.Collections.Immutable.ImmutableArray<T>System.Device.Location.GeoCoordinateSystem.Device.Location.GeoCoordinateSystem.Device.Location.GeoCoordinateSystem.Device.Location.GeoCoordinateSystem.Globalization.SortVersionSystem.Globalization.SortVersionSystem.Globalization.SortVersionSystem.Globalization.SortVersionSystem.Net.Http.HttpMethodSystem.Net.Http.HttpMethodSystem.Net.Http.HttpMethodSystem.Net.Http.HttpMethodSystem.Net.PeerToPeer.CloudSystem.Net.PeerToPeer.CloudSystem.Net.PeerToPeer.CloudSystem.Net.PeerToPeer.CloudSystem.Net.PeerToPeer.PeerNameSystem.Net.PeerToPeer.PeerNameSystem.Net.PeerToPeer.PeerNameSystem.Net.PeerToPeer.PeerNameSystem.Net.PeerToPeer.Collaboration.PeerSystem.Net.PeerToPeer.Collaboration.PeerSystem.Net.PeerToPeer.Collaboration.PeerSystem.Net.PeerToPeer.Collaboration.PeerSystem.Net.PeerToPeer.Collaboration.PeerApplicationSystem.Net.PeerToPeer.Collaboration.PeerApplicationSystem.Net.PeerToPeer.Collaboration.PeerApplicationSystem.Net.PeerToPeer.Collaboration.PeerApplicationSystem.Net.PeerToPeer.Collaboration.PeerContactSystem.Net.PeerToPeer.Collaboration.PeerContactSystem.Net.PeerToPeer.Collaboration.PeerContactSystem.Net.PeerToPeer.Collaboration.PeerContactSystem.Net.PeerToPeer.Collaboration.PeerEndPointSystem.Net.PeerToPeer.Collaboration.PeerEndPointSystem.Net.PeerToPeer.Collaboration.PeerEndPointSystem.Net.PeerToPeer.Collaboration.PeerEndPointSystem.Net.PeerToPeer.Collaboration.PeerEndPointCollectionSystem.Net.PeerToPeer.Collaboration.PeerEndPointCollectionSystem.Net.PeerToPeer.Collaboration.PeerEndPointCollectionSystem.Net.PeerToPeer.Collaboration.PeerEndPointCollectionSystem.Net.PeerToPeer.Collaboration.PeerNearMeSystem.Net.PeerToPeer.Collaboration.PeerNearMeSystem.Net.PeerToPeer.Collaboration.PeerNearMeSystem.Net.PeerToPeer.Collaboration.PeerNearMeSystem.Net.PeerToPeer.Collaboration.PeerObjectSystem.Net.PeerToPeer.Collaboration.PeerObjectSystem.Net.PeerToPeer.Collaboration.PeerObjectSystem.Net.PeerToPeer.Collaboration.PeerObjectSystem.Net.Security.SslApplicationProtocolSystem.Net.Security.SslApplicationProtocolSystem.Net.Security.SslApplicationProtocolSystem.Net.Security.SslApplicationProtocolSystem.Net.Sockets.UdpReceiveResultSystem.Net.Sockets.UdpReceiveResultSystem.Net.Sockets.UdpReceiveResultSystem.Net.Sockets.UdpReceiveResultSystem.Numerics.BigIntegerSystem.Numerics.BigIntegerSystem.Numerics.BigIntegerSystem.Numerics.BigIntegerSystem.Numerics.Matrix3x2System.Numerics.Matrix3x2System.Numerics.Matrix3x2System.Numerics.Matrix3x2System.Numerics.Matrix4x4System.Numerics.Matrix4x4System.Numerics.Matrix4x4System.Numerics.Matrix4x4System.Numerics.QuaternionSystem.Numerics.QuaternionSystem.Numerics.QuaternionSystem.Numerics.QuaternionSystem.Numerics.Vector<T>System.Numerics.Vector<T>System.Numerics.Vector<T>System.Numerics.Vector<T>System.Reflection.Emit.ExceptionHandlerSystem.Reflection.Emit.ExceptionHandlerSystem.Reflection.Emit.ExceptionHandlerSystem.Reflection.Emit.ExceptionHandlerSystem.Reflection.Metadata.AssemblyDefinitionHandleSystem.Reflection.Metadata.AssemblyDefinitionHandleSystem.Reflection.Metadata.AssemblyDefinitionHandleSystem.Reflection.Metadata.AssemblyDefinitionHandleSystem.Reflection.Metadata.AssemblyFileHandleSystem.Reflection.Metadata.AssemblyFileHandleSystem.Reflection.Metadata.AssemblyFileHandleSystem.Reflection.Metadata.AssemblyFileHandleSystem.Reflection.Metadata.AssemblyReferenceHandleSystem.Reflection.Metadata.AssemblyReferenceHandleSystem.Reflection.Metadata.AssemblyReferenceHandleSystem.Reflection.Metadata.AssemblyReferenceHandleSystem.Reflection.Metadata.BlobContentIdSystem.Reflection.Metadata.BlobContentIdSystem.Reflection.Metadata.BlobContentIdSystem.Reflection.Metadata.BlobContentIdSystem.Reflection.Metadata.BlobHandleSystem.Reflection.Metadata.BlobHandleSystem.Reflection.Metadata.BlobHandleSystem.Reflection.Metadata.BlobHandleSystem.Reflection.Metadata.ConstantHandleSystem.Reflection.Metadata.ConstantHandleSystem.Reflection.Metadata.ConstantHandleSystem.Reflection.Metadata.ConstantHandleSystem.Reflection.Metadata.CustomAttributeHandleSystem.Reflection.Metadata.CustomAttributeHandleSystem.Reflection.Metadata.CustomAttributeHandleSystem.Reflection.Metadata.CustomAttributeHandleSystem.Reflection.Metadata.CustomDebugInformationHandleSystem.Reflection.Metadata.CustomDebugInformationHandleSystem.Reflection.Metadata.CustomDebugInformationHandleSystem.Reflection.Metadata.CustomDebugInformationHandleSystem.Reflection.Metadata.DeclarativeSecurityAttributeHandleSystem.Reflection.Metadata.DeclarativeSecurityAttributeHandleSystem.Reflection.Metadata.DeclarativeSecurityAttributeHandleSystem.Reflection.Metadata.DeclarativeSecurityAttributeHandleSystem.Reflection.Metadata.DocumentHandleSystem.Reflection.Metadata.DocumentHandleSystem.Reflection.Metadata.DocumentHandleSystem.Reflection.Metadata.DocumentHandleSystem.Reflection.Metadata.DocumentNameBlobHandleSystem.Reflection.Metadata.DocumentNameBlobHandleSystem.Reflection.Metadata.DocumentNameBlobHandleSystem.Reflection.Metadata.DocumentNameBlobHandleSystem.Reflection.Metadata.EntityHandleSystem.Reflection.Metadata.EntityHandleSystem.Reflection.Metadata.EntityHandleSystem.Reflection.Metadata.EntityHandleSystem.Reflection.Metadata.EventDefinitionHandleSystem.Reflection.Metadata.EventDefinitionHandleSystem.Reflection.Metadata.EventDefinitionHandleSystem.Reflection.Metadata.EventDefinitionHandleSystem.Reflection.Metadata.ExportedTypeHandleSystem.Reflection.Metadata.ExportedTypeHandleSystem.Reflection.Metadata.ExportedTypeHandleSystem.Reflection.Metadata.ExportedTypeHandleSystem.Reflection.Metadata.FieldDefinitionHandleSystem.Reflection.Metadata.FieldDefinitionHandleSystem.Reflection.Metadata.FieldDefinitionHandleSystem.Reflection.Metadata.FieldDefinitionHandleSystem.Reflection.Metadata.GenericParameterConstraintHandleSystem.Reflection.Metadata.GenericParameterConstraintHandleSystem.Reflection.Metadata.GenericParameterConstraintHandleSystem.Reflection.Metadata.GenericParameterConstraintHandleSystem.Reflection.Metadata.GenericParameterHandleSystem.Reflection.Metadata.GenericParameterHandleSystem.Reflection.Metadata.GenericParameterHandleSystem.Reflection.Metadata.GenericParameterHandleSystem.Reflection.Metadata.GuidHandleSystem.Reflection.Metadata.GuidHandleSystem.Reflection.Metadata.GuidHandleSystem.Reflection.Metadata.GuidHandleSystem.Reflection.Metadata.HandleSystem.Reflection.Metadata.HandleSystem.Reflection.Metadata.HandleSystem.Reflection.Metadata.HandleSystem.Reflection.Metadata.ImportScopeHandleSystem.Reflection.Metadata.ImportScopeHandleSystem.Reflection.Metadata.ImportScopeHandleSystem.Reflection.Metadata.ImportScopeHandleSystem.Reflection.Metadata.InterfaceImplementationHandleSystem.Reflection.Metadata.InterfaceImplementationHandleSystem.Reflection.Metadata.InterfaceImplementationHandleSystem.Reflection.Metadata.InterfaceImplementationHandleSystem.Reflection.Metadata.LocalConstantHandleSystem.Reflection.Metadata.LocalConstantHandleSystem.Reflection.Metadata.LocalConstantHandleSystem.Reflection.Metadata.LocalConstantHandleSystem.Reflection.Metadata.LocalScopeHandleSystem.Reflection.Metadata.LocalScopeHandleSystem.Reflection.Metadata.LocalScopeHandleSystem.Reflection.Metadata.LocalScopeHandleSystem.Reflection.Metadata.LocalVariableHandleSystem.Reflection.Metadata.LocalVariableHandleSystem.Reflection.Metadata.LocalVariableHandleSystem.Reflection.Metadata.LocalVariableHandleSystem.Reflection.Metadata.ManifestResourceHandleSystem.Reflection.Metadata.ManifestResourceHandleSystem.Reflection.Metadata.ManifestResourceHandleSystem.Reflection.Metadata.ManifestResourceHandleSystem.Reflection.Metadata.MemberReferenceHandleSystem.Reflection.Metadata.MemberReferenceHandleSystem.Reflection.Metadata.MemberReferenceHandleSystem.Reflection.Metadata.MemberReferenceHandleSystem.Reflection.Metadata.MethodDebugInformationHandleSystem.Reflection.Metadata.MethodDebugInformationHandleSystem.Reflection.Metadata.MethodDebugInformationHandleSystem.Reflection.Metadata.MethodDebugInformationHandleSystem.Reflection.Metadata.MethodDefinitionHandleSystem.Reflection.Metadata.MethodDefinitionHandleSystem.Reflection.Metadata.MethodDefinitionHandleSystem.Reflection.Metadata.MethodDefinitionHandleSystem.Reflection.Metadata.MethodImplementationHandleSystem.Reflection.Metadata.MethodImplementationHandleSystem.Reflection.Metadata.MethodImplementationHandleSystem.Reflection.Metadata.MethodImplementationHandleSystem.Reflection.Metadata.MethodSpecificationHandleSystem.Reflection.Metadata.MethodSpecificationHandleSystem.Reflection.Metadata.MethodSpecificationHandleSystem.Reflection.Metadata.MethodSpecificationHandleSystem.Reflection.Metadata.ModuleDefinitionHandleSystem.Reflection.Metadata.ModuleDefinitionHandleSystem.Reflection.Metadata.ModuleDefinitionHandleSystem.Reflection.Metadata.ModuleDefinitionHandleSystem.Reflection.Metadata.ModuleReferenceHandleSystem.Reflection.Metadata.ModuleReferenceHandleSystem.Reflection.Metadata.ModuleReferenceHandleSystem.Reflection.Metadata.ModuleReferenceHandleSystem.Reflection.Metadata.NamespaceDefinitionHandleSystem.Reflection.Metadata.NamespaceDefinitionHandleSystem.Reflection.Metadata.NamespaceDefinitionHandleSystem.Reflection.Metadata.NamespaceDefinitionHandleSystem.Reflection.Metadata.ParameterHandleSystem.Reflection.Metadata.ParameterHandleSystem.Reflection.Metadata.ParameterHandleSystem.Reflection.Metadata.ParameterHandleSystem.Reflection.Metadata.PropertyDefinitionHandleSystem.Reflection.Metadata.PropertyDefinitionHandleSystem.Reflection.Metadata.PropertyDefinitionHandleSystem.Reflection.Metadata.PropertyDefinitionHandleSystem.Reflection.Metadata.SequencePointSystem.Reflection.Metadata.SequencePointSystem.Reflection.Metadata.SequencePointSystem.Reflection.Metadata.SequencePointSystem.Reflection.Metadata.SignatureHeaderSystem.Reflection.Metadata.SignatureHeaderSystem.Reflection.Metadata.SignatureHeaderSystem.Reflection.Metadata.SignatureHeaderSystem.Reflection.Metadata.StandaloneSignatureHandleSystem.Reflection.Metadata.StandaloneSignatureHandleSystem.Reflection.Metadata.StandaloneSignatureHandleSystem.Reflection.Metadata.StandaloneSignatureHandleSystem.Reflection.Metadata.StringHandleSystem.Reflection.Metadata.StringHandleSystem.Reflection.Metadata.StringHandleSystem.Reflection.Metadata.StringHandleSystem.Reflection.Metadata.TypeDefinitionHandleSystem.Reflection.Metadata.TypeDefinitionHandleSystem.Reflection.Metadata.TypeDefinitionHandleSystem.Reflection.Metadata.TypeDefinitionHandleSystem.Reflection.Metadata.TypeReferenceHandleSystem.Reflection.Metadata.TypeReferenceHandleSystem.Reflection.Metadata.TypeReferenceHandleSystem.Reflection.Metadata.TypeReferenceHandleSystem.Reflection.Metadata.TypeSpecificationHandleSystem.Reflection.Metadata.TypeSpecificationHandleSystem.Reflection.Metadata.TypeSpecificationHandleSystem.Reflection.Metadata.TypeSpecificationHandleSystem.Reflection.Metadata.UserStringHandleSystem.Reflection.Metadata.UserStringHandleSystem.Reflection.Metadata.UserStringHandleSystem.Reflection.Metadata.UserStringHandleSystem.Reflection.Metadata.Ecma335.EditAndContinueLogEntrySystem.Reflection.Metadata.Ecma335.EditAndContinueLogEntrySystem.Reflection.Metadata.Ecma335.EditAndContinueLogEntrySystem.Reflection.Metadata.Ecma335.EditAndContinueLogEntrySystem.Reflection.Metadata.Ecma335.LabelHandleSystem.Reflection.Metadata.Ecma335.LabelHandleSystem.Reflection.Metadata.Ecma335.LabelHandleSystem.Reflection.Metadata.Ecma335.LabelHandleSystem.Runtime.DurableInstancing.InstancePersistenceEventSystem.Runtime.DurableInstancing.InstancePersistenceEventSystem.Runtime.DurableInstancing.InstancePersistenceEventSystem.Runtime.DurableInstancing.InstancePersistenceEventSystem.Runtime.InteropServices.OSPlatformSystem.Runtime.InteropServices.OSPlatformSystem.Runtime.InteropServices.OSPlatformSystem.Runtime.InteropServices.OSPlatformSystem.Runtime.Intrinsics.Vector128<T>System.Runtime.Intrinsics.Vector128<T>System.Runtime.Intrinsics.Vector128<T>System.Runtime.Intrinsics.Vector128<T>System.Runtime.Intrinsics.Vector256<T>System.Runtime.Intrinsics.Vector256<T>System.Runtime.Intrinsics.Vector256<T>System.Runtime.Intrinsics.Vector256<T>System.Runtime.Intrinsics.Vector64<T>System.Runtime.Intrinsics.Vector64<T>System.Runtime.Intrinsics.Vector64<T>System.Runtime.Intrinsics.Vector64<T>System.Runtime.Versioning.FrameworkNameSystem.Runtime.Versioning.FrameworkNameSystem.Runtime.Versioning.FrameworkNameSystem.Runtime.Versioning.FrameworkNameSystem.Security.Cryptography.CngAlgorithmSystem.Security.Cryptography.CngAlgorithmSystem.Security.Cryptography.CngAlgorithmSystem.Security.Cryptography.CngAlgorithmSystem.Security.Cryptography.CngAlgorithmGroupSystem.Security.Cryptography.CngAlgorithmGroupSystem.Security.Cryptography.CngAlgorithmGroupSystem.Security.Cryptography.CngAlgorithmGroupSystem.Security.Cryptography.CngKeyBlobFormatSystem.Security.Cryptography.CngKeyBlobFormatSystem.Security.Cryptography.CngKeyBlobFormatSystem.Security.Cryptography.CngKeyBlobFormatSystem.Security.Cryptography.CngPropertySystem.Security.Cryptography.CngPropertySystem.Security.Cryptography.CngPropertySystem.Security.Cryptography.CngPropertySystem.Security.Cryptography.CngProviderSystem.Security.Cryptography.CngProviderSystem.Security.Cryptography.CngProviderSystem.Security.Cryptography.CngProviderSystem.Security.Cryptography.HashAlgorithmNameSystem.Security.Cryptography.HashAlgorithmNameSystem.Security.Cryptography.HashAlgorithmNameSystem.Security.Cryptography.HashAlgorithmNameSystem.Security.Cryptography.RSAEncryptionPaddingSystem.Security.Cryptography.RSAEncryptionPaddingSystem.Security.Cryptography.RSAEncryptionPaddingSystem.Security.Cryptography.RSAEncryptionPaddingSystem.Security.Cryptography.RSASignaturePaddingSystem.Security.Cryptography.RSASignaturePaddingSystem.Security.Cryptography.RSASignaturePaddingSystem.Security.Cryptography.RSASignaturePaddingSystem.ServiceModel.Channels.HttpMessageSettingsSystem.ServiceModel.Channels.HttpMessageSettingsSystem.ServiceModel.Channels.HttpMessageSettingsSystem.ServiceModel.Channels.HttpMessageSettingsSystem.ServiceModel.Channels.WebSocketTransportSettingsSystem.ServiceModel.Channels.WebSocketTransportSettingsSystem.ServiceModel.Channels.WebSocketTransportSettingsSystem.ServiceModel.Channels.WebSocketTransportSettingsSystem.ServiceModel.Discovery.DiscoveryMessageSequenceSystem.ServiceModel.Discovery.DiscoveryMessageSequenceSystem.ServiceModel.Discovery.DiscoveryMessageSequenceSystem.ServiceModel.Discovery.DiscoveryMessageSequenceSystem.Speech.Synthesis.TtsEngine.ContourPointSystem.Speech.Synthesis.TtsEngine.ContourPointSystem.Speech.Synthesis.TtsEngine.ContourPointSystem.Speech.Synthesis.TtsEngine.ContourPointSystem.Speech.Synthesis.TtsEngine.FragmentStateSystem.Speech.Synthesis.TtsEngine.FragmentStateSystem.Speech.Synthesis.TtsEngine.FragmentStateSystem.Speech.Synthesis.TtsEngine.FragmentStateSystem.Speech.Synthesis.TtsEngine.ProsodyNumberSystem.Speech.Synthesis.TtsEngine.ProsodyNumberSystem.Speech.Synthesis.TtsEngine.ProsodyNumberSystem.Speech.Synthesis.TtsEngine.ProsodyNumberSystem.Speech.Synthesis.TtsEngine.SpeechEventInfoSystem.Speech.Synthesis.TtsEngine.SpeechEventInfoSystem.Speech.Synthesis.TtsEngine.SpeechEventInfoSystem.Speech.Synthesis.TtsEngine.SpeechEventInfoSystem.Threading.CancellationTokenRegistrationSystem.Threading.CancellationTokenRegistrationSystem.Threading.CancellationTokenRegistrationSystem.Threading.CancellationTokenRegistrationSystem.Threading.Tasks.ValueTaskSystem.Threading.Tasks.ValueTaskSystem.Threading.Tasks.ValueTaskSystem.Threading.Tasks.ValueTaskSystem.Threading.Tasks.ValueTask<TResult>System.Threading.Tasks.ValueTask<TResult>System.Threading.Tasks.ValueTask<TResult>System.Threading.Tasks.ValueTask<TResult>System.Threading.Tasks.Dataflow.DataflowMessageHeaderSystem.Threading.Tasks.Dataflow.DataflowMessageHeaderSystem.Threading.Tasks.Dataflow.DataflowMessageHeaderSystem.Threading.Tasks.Dataflow.DataflowMessageHeaderSystem.Web.UI.WebControls.DataKeySystem.Web.UI.WebControls.DataKeySystem.Web.UI.WebControls.DataKeySystem.Web.UI.WebControls.DataKeySystem.Windows.CornerRadiusSystem.Windows.CornerRadiusSystem.Windows.CornerRadiusSystem.Windows.CornerRadiusSystem.Windows.FigureLengthSystem.Windows.FigureLengthSystem.Windows.FigureLengthSystem.Windows.FigureLengthSystem.Windows.GridLengthSystem.Windows.GridLengthSystem.Windows.GridLengthSystem.Windows.GridLengthSystem.Windows.Controls.DataGridLengthSystem.Windows.Controls.DataGridLengthSystem.Windows.Controls.DataGridLengthSystem.Windows.Controls.DataGridLengthSystem.Windows.Controls.VirtualizationCacheLengthSystem.Windows.Controls.VirtualizationCacheLengthSystem.Windows.Controls.VirtualizationCacheLengthSystem.Windows.Controls.VirtualizationCacheLengthSystem.Windows.Controls.Ribbon.RibbonControlLengthSystem.Windows.Controls.Ribbon.RibbonControlLengthSystem.Windows.Controls.Ribbon.RibbonControlLengthSystem.Windows.Controls.Ribbon.RibbonControlLengthSystem.Windows.Input.StylusPointSystem.Windows.Input.StylusPointSystem.Windows.Input.StylusPointSystem.Windows.Input.StylusPointSystem.Windows.Input.TouchPointSystem.Windows.Input.TouchPointSystem.Windows.Input.TouchPointSystem.Windows.Input.TouchPointSystem.Windows.Media.ColorSystem.Windows.Media.ColorSystem.Windows.Media.ColorSystem.Windows.Media.ColorSystem.Windows.Media.PixelFormatSystem.Windows.Media.PixelFormatSystem.Windows.Media.PixelFormatSystem.Windows.Media.PixelFormatSystem.Windows.Media.Animation.KeyTimeSystem.Windows.Media.Animation.KeyTimeSystem.Windows.Media.Animation.KeyTimeSystem.Windows.Media.Animation.KeyTimeSystem.Windows.Media.TextFormatting.CharacterBufferRangeSystem.Windows.Media.TextFormatting.CharacterBufferRangeSystem.Windows.Media.TextFormatting.CharacterBufferRangeSystem.Windows.Media.TextFormatting.CharacterBufferRangeSystem.Windows.Media.TextFormatting.CharacterBufferReferenceSystem.Windows.Media.TextFormatting.CharacterBufferReferenceSystem.Windows.Media.TextFormatting.CharacterBufferReferenceSystem.Windows.Media.TextFormatting.CharacterBufferReferenceSystem.Windows.Media.TextFormatting.CharacterHitSystem.Windows.Media.TextFormatting.CharacterHitSystem.Windows.Media.TextFormatting.CharacterHitSystem.Windows.Media.TextFormatting.CharacterHitSystem.Windows.Media.TextFormatting.MinMaxParagraphWidthSystem.Windows.Media.TextFormatting.MinMaxParagraphWidthSystem.Windows.Media.TextFormatting.MinMaxParagraphWidthSystem.Windows.Media.TextFormatting.MinMaxParagraphWidthSystem.Xaml.AttachableMemberIdentifierSystem.Xaml.AttachableMemberIdentifierSystem.Xaml.AttachableMemberIdentifierSystem.Xaml.AttachableMemberIdentifier
Examples
See the example for the IEquatable<T>.Equals method.
Remarks
This interface is implemented by types whose values can be equated (for example, the numeric and string classes). A value type or class implements the Equals method to create a type-specific method suitable for determining equality of instances.
Note
The IComparable<T> interface defines the CompareTo method, which determines the sort order of instances of the implementing type. The IEquatable<T> interface defines the Equals method, which determines the equality of instances of the implementing type.
The IEquatable<T> interface is used by generic collection objects such as Dictionary<TKey,TValue>, List<T>, and LinkedList<T> when testing for equality in such methods as Contains
, IndexOf
, LastIndexOf
, and Remove
. It should be implemented for any object that might be stored in a generic collection.
Notes to Implementers
Replace the type parameter of the IEquatable<T> interface with the type that is implementing this interface.
If you implement IEquatable<T>, you should also override the base class implementations of Equals(Object) and GetHashCode() so that their behavior is consistent with that of the Equals(T) method. If you do override Equals(Object), your overridden implementation is also called in calls to the static
For information on overriding Equals(Object), see the Equals(Object) article.
Equals(System.Object, System.Object)
method on your class. In addition, you should overload the op_Equality
and op_Inequality
operators. This ensures that all tests for equality return consistent results.
Note that there are some designs where a type supports an order relation, but equality may be distinct from an ordering relation. Consider a `Person` class where you sort alphabetically. Two people with the same name sort the same, but are not the same person.
Methods
Equals(T) Equals(T) Equals(T) Equals(T) |
Indicates whether the current object is equal to another object of the same type. |
Applies to
See also
Feedback
We'd love to hear your thoughts. Choose the type you'd like to provide:
Our feedback system is built on GitHub Issues. Read more on our blog.
Loading feedback...