IEquatable<T> IEquatable<T> IEquatable<T> IEquatable<T> Interface
Definition
Definiert eine generalisierte Methode, die von einem Werttyp oder von einer Klasse zur Erstellung einer typspezifischen Methode implementiert wird, um die Gleichheit von Instanzen zu ermitteln.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)
Typparameter
- T
Der Typ der zu vergleichenden Objekte.The type of objects to compare.
- Abgeleitet
-
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
Beispiele
Siehe das Beispiel für die IEquatable<T>.Equals Methode.See the example for the IEquatable<T>.Equals method.
Hinweise
Diese Schnittstelle wird von Typen implementiert, deren Werte (z. B. numerische und String-Klassen) gleichgesetzt werden können.This interface is implemented by types whose values can be equated (for example, the numeric and string classes). Ein Werttyp oder einer Klasse implementiert die Equals Methode, um eine typspezifische-Methode zum Bestimmen der Gleichheit von Instanzen zu erstellen.A value type or class implements the Equals method to create a type-specific method suitable for determining equality of instances.
Hinweis
Die IComparable<T> Schnittstelle definiert die CompareTo Methode, die die Sortierreihenfolge der Instanzen des Implementierungstyps bestimmt.The IComparable<T> interface defines the CompareTo method, which determines the sort order of instances of the implementing type. Die IEquatable<T> Schnittstelle definiert die Equals Methode, die die Gleichheit von Instanzen des Implementierungstyps bestimmt.The IEquatable<T> interface defines the Equals method, which determines the equality of instances of the implementing type.
Die IEquatable<T> Schnittstelle wird von der generischen Auflistungsobjekten verwendet, z. B. Dictionary<TKey,TValue>, List<T>, und LinkedList<T> beim Testen auf Gleichheit in Methoden wie Contains
, IndexOf
, LastIndexOf
, und Remove
.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
. Sie sollten für ein beliebiges Objekt implementiert werden, die in einer generischen Auflistung gespeichert werden kann.It should be implemented for any object that might be stored in a generic collection.
Hinweise für Ausführende
Ersetzen der Typparameter, der die IEquatable<T> Schnittstelle mit dem Typ, der diese Schnittstelle implementiert.Replace the type parameter of the IEquatable<T> interface with the type that is implementing this interface.
Wenn Sie implementieren IEquatable<T>, sollten Sie auch die Implementierungen der Basisklasse der überschreiben Equals(Object) und GetHashCode() , damit ihr Verhalten konsistent mit ist der Equals(T) Methode.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. Wenn Sie außer Kraft setzen Equals(Object), die überschriebene Implementierung ist die Abkürzung in Aufrufen der statischen
Informationen zum Überschreiben Equals(Object), finden Sie unter den Equals(Object) Artikel.For information on overriding Equals(Object), see the Equals(Object) article.
Equals(System.Object, System.Object)
Methode in Ihrer Klasse auf.If you do override Equals(Object), your overridden implementation is also called in calls to the static Equals(System.Object, System.Object)
method on your class. Darüber hinaus sollten Sie überladen der op_Equality
und op_Inequality
Operatoren.In addition, you should overload the op_Equality
and op_Inequality
operators. Dadurch wird sichergestellt, dass alle Tests für Gleichheit konsistente Ergebnisse zurückgeben.This ensures that all tests for equality return consistent results.
Beachten Sie, dass einige Entwürfe, in denen ein Typ mit eine Order-Beziehung unterstützt, aber auf Gleichheit ist möglicherweise eine Beziehung vom Typ Bestellung unterscheidet.Note that there are some designs where a type supports an order relation, but equality may be distinct from an ordering relation. Erwägen Sie eine `Person` Klasse, in dem Sie alphabetisch zu sortieren.Consider a `Person` class where you sort alphabetically. Zwei Personen mit demselben Namen identisch zu sortieren, sind jedoch nicht dieselbe Person.Two people with the same name sort the same, but are not the same person.
Methoden
Equals(T) Equals(T) Equals(T) Equals(T) |
Gibt an, ob das aktuelle Objekt gleich einem anderen Objekt des gleichen Typs ist.Indicates whether the current object is equal to another object of the same type. |
Gilt für:
Siehe auch
Feedback
Wir möchten gern Ihre Meinung hören. Wählen Sie aus, welche Art Feedback Sie uns geben möchten:
Unser Feedbacksystem basiert auf GitHub Issues. Weitere Informationen finden Sie in unserem Blog.
Feedback wird geladen...