# IdComparer Methods

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.transactions/orleans.transactions.participantid.idcomparer/)

## Equals(ParticipantId, ParticipantId) {#equals-orleans-transactions-participantid-orleans-transactions-participantid-93fbe747}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.transactions/orleans.transactions.participantid.idcomparer/methods/equals-orleans-transactions-participantid-orleans-transactions-participantid-93fbe747/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Transactions/DistributedTM/ParticipantId.cs#L49)

```csharp
public bool Equals(ParticipantId x, ParticipantId y)
```

Determines whether the specified objects are equal.

### Parameters

- `x` (`ParticipantId`): The first object of type `T` to compare.
- `y` (`ParticipantId`): The second object of type `T` to compare.

### Returns

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

## GetHashCode(ParticipantId) {#gethashcode-orleans-transactions-participantid-da34c082}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.transactions/orleans.transactions.participantid.idcomparer/methods/gethashcode-orleans-transactions-participantid-da34c082/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Transactions/DistributedTM/ParticipantId.cs#L52)

```csharp
public int GetHashCode(ParticipantId obj)
```

Returns a hash code for the specified object.

### Parameters

- `obj` (`ParticipantId`): The `System.Object` for which a hash code is to be returned.

### Returns

A hash code for the specified object.

### Exceptions

- `System.ArgumentNullException`: The type of `obj` is a reference type and `obj` is `null`.
