Table of Contents

Class MemberSerializer.ObjectReferenceEqualityComparer

Namespace
Stride.Core.Serialization
Assembly
Stride.Core.dll

Implements an equality comparer based on object reference instead of Equals(object).

public class MemberSerializer.ObjectReferenceEqualityComparer : EqualityComparer<object>, IEqualityComparer<object>, IEqualityComparer
Inheritance
MemberSerializer.ObjectReferenceEqualityComparer
Implements
Inherited Members

Properties

Default

public static IEqualityComparer<object> Default { get; }

Property Value

IEqualityComparer<object>

Methods

Equals(object, object)

When overridden in a derived class, determines whether two objects of type object are equal.

public override bool Equals(object x, object y)

Parameters

x object

The first object to compare.

y object

The second object to compare.

Returns

bool

true if the specified objects are equal; otherwise, false.

GetHashCode(object)

When overridden in a derived class, serves as a hash function for the specified object for hashing algorithms and data structures, such as a hash table.

public override int GetHashCode(object obj)

Parameters

obj object

The object for which to get a hash code.

Returns

int

A hash code for the specified object.

Exceptions

ArgumentNullException

The type of obj is a reference type and obj is null.