> ## Documentation Index
> Fetch the complete documentation index at: https://easyaf.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# IIdentifiableEqualityComparer

> Provides an equality comparer for objects that implement `IIdentifiable`1`. Compares objects based on their Id property values for equality and hash code gen...

## Definition

**Assembly:** CloudNimble.EasyAF.Core.dll

**Namespace:** CloudNimble.EasyAF.Core

**Inheritance:** System.Object

## Syntax

```csharp theme={"dark"}
CloudNimble.EasyAF.Core.IIdentifiableEqualityComparer<T>
```

## Summary

Provides an equality comparer for objects that implement `IIdentifiable`1\`.
Compares objects based on their Id property values for equality and hash code generation.

## Type Parameters

* `T` - The type of the identifier used by the identifiable objects.

## Constructors

### <Icon icon="hammer" iconType="duotone" color="#E0EC32" size={24} className="mr-2" /> .ctor

#### Syntax

```csharp theme={"dark"}
public IIdentifiableEqualityComparer()
```

### <Icon icon="hammer" iconType="duotone" color="#E0EC32" size={24} className="mr-2" /> .ctor <Badge color="gray">Inherited</Badge>

<Note>Inherited from `object`</Note>

#### Syntax

```csharp theme={"dark"}
public Object()
```

## Methods

### <Icon icon="function" iconType="duotone" color="#E0EC32" size={24} className="mr-2" /> Equals

Determines whether the specified `IIdentifiable`1\` objects are equal by comparing their Id properties.

#### Syntax

```csharp theme={"dark"}
public bool Equals(CloudNimble.EasyAF.Core.IIdentifiable<T> x, CloudNimble.EasyAF.Core.IIdentifiable<T> y)
```

#### Parameters

| Name | Type                                       | Description                   |
| ---- | ------------------------------------------ | ----------------------------- |
| `x`  | `CloudNimble.EasyAF.Core.IIdentifiable<T>` | The first object to compare.  |
| `y`  | `CloudNimble.EasyAF.Core.IIdentifiable<T>` | The second object to compare. |

#### Returns

Type: `bool`
True if the objects are equal (including both being null), false otherwise.

### <Icon icon="code-fork" iconType="duotone" color="#E0EC32" size={24} className="mr-2" /> Equals <Badge color="gray">Inherited</Badge> <Badge color="orange">Virtual</Badge>

<Note>Inherited from `object`</Note>

#### Syntax

```csharp theme={"dark"}
public virtual bool Equals(object obj)
```

#### Parameters

| Name  | Type      | Description |
| ----- | --------- | ----------- |
| `obj` | `object?` | -           |

#### Returns

Type: `bool`

### <Icon icon="thumbtack" iconType="duotone" color="#E0EC32" size={24} className="mr-2" /> Equals <Badge color="gray">Inherited</Badge>

<Note>Inherited from `object`</Note>

#### Syntax

```csharp theme={"dark"}
public static bool Equals(object objA, object objB)
```

#### Parameters

| Name   | Type      | Description |
| ------ | --------- | ----------- |
| `objA` | `object?` | -           |
| `objB` | `object?` | -           |

#### Returns

Type: `bool`

### <Icon icon="function" iconType="duotone" color="#E0EC32" size={24} className="mr-2" /> GetHashCode

Returns a hash code for the specified `IIdentifiable`1\` object based on its Id property.

#### Syntax

```csharp theme={"dark"}
public int GetHashCode(CloudNimble.EasyAF.Core.IIdentifiable<T> obj)
```

#### Parameters

| Name  | Type                                       | Description                              |
| ----- | ------------------------------------------ | ---------------------------------------- |
| `obj` | `CloudNimble.EasyAF.Core.IIdentifiable<T>` | The object for which to get a hash code. |

#### Returns

Type: `int`
A hash code for the specified object.

#### Exceptions

| Exception               | Description              |
| ----------------------- | ------------------------ |
| `ArgumentNullException` | Thrown when obj is null. |

### <Icon icon="code-fork" iconType="duotone" color="#E0EC32" size={24} className="mr-2" /> GetHashCode <Badge color="gray">Inherited</Badge> <Badge color="orange">Virtual</Badge>

<Note>Inherited from `object`</Note>

#### Syntax

```csharp theme={"dark"}
public virtual int GetHashCode()
```

#### Returns

Type: `int`

### <Icon icon="function" iconType="duotone" color="#E0EC32" size={24} className="mr-2" /> GetType <Badge color="gray">Inherited</Badge>

<Note>Inherited from `object`</Note>

#### Syntax

```csharp theme={"dark"}
public System.Type GetType()
```

#### Returns

Type: `System.Type`

### <Icon icon="function" iconType="duotone" color="#E0EC32" size={24} className="mr-2" /> MemberwiseClone <Badge color="gray">Inherited</Badge>

<Note>Inherited from `object`</Note>

#### Syntax

```csharp theme={"dark"}
protected internal object MemberwiseClone()
```

#### Returns

Type: `object`

### <Icon icon="thumbtack" iconType="duotone" color="#E0EC32" size={24} className="mr-2" /> ReferenceEquals <Badge color="gray">Inherited</Badge>

<Note>Inherited from `object`</Note>

#### Syntax

```csharp theme={"dark"}
public static bool ReferenceEquals(object objA, object objB)
```

#### Parameters

| Name   | Type      | Description |
| ------ | --------- | ----------- |
| `objA` | `object?` | -           |
| `objB` | `object?` | -           |

#### Returns

Type: `bool`

### <Icon icon="code-fork" iconType="duotone" color="#E0EC32" size={24} className="mr-2" /> ToString <Badge color="gray">Inherited</Badge> <Badge color="orange">Virtual</Badge>

<Note>Inherited from `object`</Note>

#### Syntax

```csharp theme={"dark"}
public virtual string ToString()
```

#### Returns

Type: `string?`

## Related APIs

* System.Collections.Generic.IEqualityComparer\<CloudNimble.EasyAF.Core.IIdentifiable\<T>>
