Table of Contents

Class ElectionId

Namespace
MongoDB.Driver.Core.Clusters
Assembly
MongoDB.Driver.Core.dll

An election id from the server.

public sealed class ElectionId : IEquatable<ElectionId>, IComparable<ElectionId>
Inheritance
ElectionId
Implements
Inherited Members

Constructors

ElectionId(ObjectId)

Initializes a new instance of the ElectionId class.

public ElectionId(ObjectId id)

Parameters

id ObjectId

The identifier.

Methods

CompareTo(ElectionId)

Compares the current object with another object of the same type.

public int CompareTo(ElectionId other)

Parameters

other ElectionId

An object to compare with this object.

Returns

int

A value that indicates the relative order of the objects being compared. The return value has the following meanings: Value Meaning Less than zero This object is less than the other parameter.Zero This object is equal to other. Greater than zero This object is greater than other.

Equals(ElectionId)

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

public bool Equals(ElectionId other)

Parameters

other ElectionId

An object to compare with this object.

Returns

bool

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

Equals(object)

Determines whether the specified object, is equal to this instance.

public override bool Equals(object obj)

Parameters

obj object

The object to compare with this instance.

Returns

bool

true if the specified object is equal to this instance; otherwise, false.

GetHashCode()

Returns a hash code for this instance.

public override int GetHashCode()

Returns

int

A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.

ToString()

Returns a string that represents this instance.

public override string ToString()

Returns

string

A string that represents this instance.