Show / Hide Table of Contents

# Struct AffinityTopologyVersion

Affinity topology version.

##### Implements

System.IEquatable<AffinityTopologyVersion>
System.IComparable<AffinityTopologyVersion>

##### Inherited Members

System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetType()

###### Namespace: Apache.Ignite.Core.Cache.Affinity

###### Assembly: Apache.Ignite.Core.dll

##### Syntax

    public struct AffinityTopologyVersion : IEquatable<AffinityTopologyVersion>, IComparable<AffinityTopologyVersion>

### Constructors

#### AffinityTopologyVersion(Int64, Int32)

Initializes a new instance of the AffinityTopologyVersion struct.

##### Declaration

    public AffinityTopologyVersion(long version, int minorVersion)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int64 | version | The version.
System.Int32 | minorVersion | The minor version.

### Properties

#### MinorVersion

Gets the minor version, which is increased when new caches start.

##### Declaration

    public int MinorVersion { get; }

##### Property Value

Type | Description
--- | ---
System.Int32 |

#### Version

Gets the major version, same as TopologyVersion.

##### Declaration

    public long Version { get; }

##### Property Value

Type | Description
--- | ---
System.Int64 |

### Methods

#### CompareTo(AffinityTopologyVersion)

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.

##### Declaration

    public int CompareTo(AffinityTopologyVersion other)

##### Parameters

Type | Name | Description
--- | --- | ---
AffinityTopologyVersion | other |

##### Returns

Type | Description
--- | ---
System.Int32 |

#### Equals(AffinityTopologyVersion)

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

##### Declaration

    public bool Equals(AffinityTopologyVersion other)

##### Parameters

Type | Name | Description
--- | --- | ---
AffinityTopologyVersion | other | An object to compare with this object.

##### Returns

Type | Description
--- | ---
System.Boolean | true if the current object is equal to the `other` parameter; otherwise, false.

#### Equals(Object)

Determines whether the specified System.Object, is equal to this instance.

##### Declaration

    public override bool Equals(object obj)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Object | obj | The System.Object to compare with this instance.

##### Returns

Type | Description
--- | ---
System.Boolean | `true` if the specified System.Object is equal to this instance; otherwise, `false`.

##### Overrides

System.ValueType.Equals(System.Object)

#### GetHashCode()

Returns a hash code for this instance.

##### Declaration

    public override int GetHashCode()

##### Returns

Type | Description
--- | ---
System.Int32 | A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.

##### Overrides

System.ValueType.GetHashCode()

#### ToString()

Returns a System.String that represents this instance.

##### Declaration

    public override string ToString()

##### Returns

Type | Description
--- | ---
System.String | A System.String that represents this instance.

##### Overrides

System.ValueType.ToString()

### Operators

#### Equality(AffinityTopologyVersion, AffinityTopologyVersion)

Implements the operator ==.

##### Declaration

    public static bool operator ==(AffinityTopologyVersion left, AffinityTopologyVersion right)

##### Parameters

Type | Name | Description
--- | --- | ---
AffinityTopologyVersion | left | The left operand.
AffinityTopologyVersion | right | The right operand.

##### Returns

Type | Description
--- | ---
System.Boolean | The result of the operator.

#### GreaterThan(AffinityTopologyVersion, AffinityTopologyVersion)

Implements the operator 'greater than'.

##### Declaration

    public static bool operator>(AffinityTopologyVersion left, AffinityTopologyVersion right)

##### Parameters

Type | Name | Description
--- | --- | ---
AffinityTopologyVersion | left | The left operand.
AffinityTopologyVersion | right | The right operand.

##### Returns

Type | Description
--- | ---
System.Boolean | The result of the operator.

#### GreaterThanOrEqual(AffinityTopologyVersion, AffinityTopologyVersion)

Implements the operator 'greater or equal than'.

##### Declaration

    public static bool operator >=(AffinityTopologyVersion left, AffinityTopologyVersion right)

##### Parameters

Type | Name | Description
--- | --- | ---
AffinityTopologyVersion | left | The left operand.
AffinityTopologyVersion | right | The right operand.

##### Returns

Type | Description
--- | ---
System.Boolean | The result of the operator.

#### Inequality(AffinityTopologyVersion, AffinityTopologyVersion)

Implements the operator !=.

##### Declaration

    public static bool operator !=(AffinityTopologyVersion left, AffinityTopologyVersion right)

##### Parameters

Type | Name | Description
--- | --- | ---
AffinityTopologyVersion | left | The left operand.
AffinityTopologyVersion | right | The right operand.

##### Returns

Type | Description
--- | ---
System.Boolean | The result of the operator.

#### LessThan(AffinityTopologyVersion, AffinityTopologyVersion)

Implements the operator 'less than'.

##### Declaration

    public static bool operator <(AffinityTopologyVersion left, AffinityTopologyVersion right)

##### Parameters

Type | Name | Description
--- | --- | ---
AffinityTopologyVersion | left | The left operand.
AffinityTopologyVersion | right | The right operand.

##### Returns

Type | Description
--- | ---
System.Boolean | The result of the operator.

#### LessThanOrEqual(AffinityTopologyVersion, AffinityTopologyVersion)

Implements the operator 'less or equal than'.

##### Declaration

    public static bool operator <=(AffinityTopologyVersion left, AffinityTopologyVersion right)

##### Parameters

Type | Name | Description
--- | --- | ---
AffinityTopologyVersion | left | The left operand.
AffinityTopologyVersion | right | The right operand.

##### Returns

Type | Description
--- | ---
System.Boolean | The result of the operator.

### Implements

System.IEquatable<T>
System.IComparable<T>