# MembershipVersion Methods

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.core.abstractions/orleans.runtime.membershipversion/)

## CompareTo(MembershipVersion) {#compareto-orleans-runtime-membershipversion-054e2a66}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.core.abstractions/orleans.runtime.membershipversion/methods/compareto-orleans-runtime-membershipversion-054e2a66/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Core.Abstractions/Runtime/MembershipVersion.cs#L35)

```csharp
public int CompareTo(MembershipVersion other)
```

Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.

### Parameters

- `other` (`MembershipVersion`): An object to compare with this instance.

### Returns

A value that indicates the relative order of the objects being compared. The return value has these meanings: 

| Value | Meaning |
| --- | --- |
| Less than zero | This instance precedes `other` in the sort order. |
| Zero | This instance occurs in the same position in the sort order as `other`. |
| Greater than zero | This instance follows `other` in the sort order. |

## Equals(MembershipVersion) {#equals-orleans-runtime-membershipversion-2ce90b74}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.core.abstractions/orleans.runtime.membershipversion/methods/equals-orleans-runtime-membershipversion-2ce90b74/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Core.Abstractions/Runtime/MembershipVersion.cs#L38)

```csharp
public bool Equals(MembershipVersion other)
```

Indicates whether the current object is equal to another object of the same type.

### Parameters

- `other` (`MembershipVersion`): An object to compare with this object.

### Returns

`true` if the current object is equal to the `other` parameter; otherwise, `false`.

## Equals(object?) {#equals-object-nullable-af61b545}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.core.abstractions/orleans.runtime.membershipversion/methods/equals-object-nullable-af61b545/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Core.Abstractions/Runtime/MembershipVersion.cs#L41)

```csharp
public override bool Equals(object? obj)
```

Indicates whether this instance and a specified object are equal.

### Parameters

- `obj` (`object?`): The object to compare with the current instance.

### Returns

`true` if `obj` and this instance are the same type and represent the same value; otherwise, `false`.

## GetHashCode {#gethashcode-cae6d5ed}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.core.abstractions/orleans.runtime.membershipversion/methods/gethashcode-cae6d5ed/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Core.Abstractions/Runtime/MembershipVersion.cs#L44)

```csharp
public override int GetHashCode()
```

Returns the hash code for this instance.

### Returns

A 32-bit signed integer that is the hash code for this instance.

## ToString {#tostring-769878d6}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.core.abstractions/orleans.runtime.membershipversion/methods/tostring-769878d6/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Core.Abstractions/Runtime/MembershipVersion.cs#L47)

```csharp
public override string ToString()
```

Returns the fully qualified type name of this instance.

### Returns

The fully qualified type name.

## operator ==(MembershipVersion, MembershipVersion) {#op-equality-orleans-runtime-membershipversion-orleans-runtime-membershipversion-0fd61b8e}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.core.abstractions/orleans.runtime.membershipversion/methods/op-equality-orleans-runtime-membershipversion-orleans-runtime-membershipversion-0fd61b8e/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Core.Abstractions/Runtime/MembershipVersion.cs#L77)

```csharp
public static bool operator ==(MembershipVersion left, MembershipVersion right)
```

Compares the provided operands for equality.

### Parameters

- `left` (`MembershipVersion`): The left operand.
- `right` (`MembershipVersion`): The right operand.

### Returns

`true` if the provided values are equal, otherwise `false`.

## operator &gt;(MembershipVersion, MembershipVersion) {#op-greaterthan-orleans-runtime-membershipversion-orleans-runtime-membershipversi-7bc54eea}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.core.abstractions/orleans.runtime.membershipversion/methods/op-greaterthan-orleans-runtime-membershipversion-orleans-runtime-membershipversi-7bc54eea/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Core.Abstractions/Runtime/MembershipVersion.cs#L109)

```csharp
public static bool operator >(MembershipVersion left, MembershipVersion right)
```

Compares the provided operands and returns `true` if the left operand is greater than the right operand, otherwise `false`.

### Parameters

- `left` (`MembershipVersion`): The left operand.
- `right` (`MembershipVersion`): The right operand.

### Returns

`true` if the left operand is greater than the right operand, otherwise `false`.

## operator &gt;=(MembershipVersion, MembershipVersion) {#op-greaterthanorequal-orleans-runtime-membershipversion-orleans-runtime-membersh-7027c837}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.core.abstractions/orleans.runtime.membershipversion/methods/op-greaterthanorequal-orleans-runtime-membershipversion-orleans-runtime-membersh-7027c837/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Core.Abstractions/Runtime/MembershipVersion.cs#L93)

```csharp
public static bool operator >=(MembershipVersion left, MembershipVersion right)
```

Compares the provided operands and returns `true` if the left operand is greater than or equal to the right operand, otherwise `false`.

### Parameters

- `left` (`MembershipVersion`): The left operand.
- `right` (`MembershipVersion`): The right operand.

### Returns

`true` if the left operand is greater than or equal to the right operand, otherwise `false`.

## operator !=(MembershipVersion, MembershipVersion) {#op-inequality-orleans-runtime-membershipversion-orleans-runtime-membershipversio-f876e842}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.core.abstractions/orleans.runtime.membershipversion/methods/op-inequality-orleans-runtime-membershipversion-orleans-runtime-membershipversio-f876e842/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Core.Abstractions/Runtime/MembershipVersion.cs#L85)

```csharp
public static bool operator !=(MembershipVersion left, MembershipVersion right)
```

Compares the provided operands for inequality.

### Parameters

- `left` (`MembershipVersion`): The left operand.
- `right` (`MembershipVersion`): The right operand.

### Returns

`true` if the provided values are not equal, otherwise `false`.

## operator &lt;(MembershipVersion, MembershipVersion) {#op-lessthan-orleans-runtime-membershipversion-orleans-runtime-membershipversion-e0ee2334}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.core.abstractions/orleans.runtime.membershipversion/methods/op-lessthan-orleans-runtime-membershipversion-orleans-runtime-membershipversion-e0ee2334/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Core.Abstractions/Runtime/MembershipVersion.cs#L117)

```csharp
public static bool operator <(MembershipVersion left, MembershipVersion right)
```

Compares the provided operands and returns `true` if the left operand is less than the right operand, otherwise `false`.

### Parameters

- `left` (`MembershipVersion`): The left operand.
- `right` (`MembershipVersion`): The right operand.

### Returns

`true` if the left operand is less than the right operand, otherwise `false`.

## operator &lt;=(MembershipVersion, MembershipVersion) {#op-lessthanorequal-orleans-runtime-membershipversion-orleans-runtime-membershipv-3d79afad}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.core.abstractions/orleans.runtime.membershipversion/methods/op-lessthanorequal-orleans-runtime-membershipversion-orleans-runtime-membershipv-3d79afad/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Core.Abstractions/Runtime/MembershipVersion.cs#L101)

```csharp
public static bool operator <=(MembershipVersion left, MembershipVersion right)
```

Compares the provided operands and returns `true` if the left operand is less than or equal to the right operand, otherwise `false`.

### Parameters

- `left` (`MembershipVersion`): The left operand.
- `right` (`MembershipVersion`): The right operand.

### Returns

`true` if the left operand is less than or equal to the right operand, otherwise `false`.
