Table of Contents

Class BsonObjectId

Namespace
MongoDB.Bson
Assembly
MongoDB.Bson.dll

Represents a BSON ObjectId value (see also ObjectId).

public class BsonObjectId : BsonValue, IComparable<BsonValue>, IConvertible, IEquatable<BsonValue>, IComparable<BsonObjectId>, IEquatable<BsonObjectId>
Inheritance
BsonObjectId
Implements
Inherited Members
Extension Methods

Constructors

BsonObjectId(ObjectId)

Initializes a new instance of the BsonObjectId class.

Properties

BsonType

Gets the BsonType of this BsonValue.

Empty

Gets an instance of BsonObjectId where the value is empty.

Value

Gets the value of this BsonObjectId.

Methods

CompareTo(BsonObjectId)

Compares this BsonObjectId to another BsonObjectId.

CompareTo(BsonValue)

Compares the BsonObjectId to another BsonValue.

Create(object)

Creates a new BsonObjectId.

Equals(BsonObjectId)

Compares this BsonObjectId to another BsonObjectId.

Equals(object)

Compares this BsonObjectId to another object.

GetHashCode()

Gets the hash code.

IConvertibleToStringImplementation(IFormatProvider)

Implementation of the IConvertible ToString method.

ToString()

Returns a string representation of the value.

Operators

operator ==(BsonObjectId, BsonObjectId)

Compares two BsonObjectId values.

implicit operator BsonObjectId(ObjectId)

Converts an ObjectId to a BsonObjectId.

operator !=(BsonObjectId, BsonObjectId)

Compares two BsonObjectId values.