Table of Contents

Constructor BsonObjectId

Namespace
MongoDB.Bson
Assembly
MongoDB.Bson.dll

BsonObjectId(ObjectId)

Initializes a new instance of the BsonObjectId class.

public BsonObjectId(ObjectId value)

Parameters

value ObjectId

The value.

BsonObjectId(byte[])

Initializes a new instance of the BsonObjectId class.

[Obsolete("Use new BsonObjectId(ObjectId value) instead.")]
public BsonObjectId(byte[] bytes)

Parameters

bytes byte[]

The bytes.

BsonObjectId(DateTime, int, short, int)

Initializes a new instance of the BsonObjectId class.

[Obsolete("Use new BsonObjectId(new ObjectId(DateTime timestamp, int machine, short pid, int increment)) instead.")]
public BsonObjectId(DateTime timestamp, int machine, short pid, int increment)

Parameters

timestamp DateTime

The timestamp (expressed as a DateTime).

machine int

The machine hash.

pid short

The PID.

increment int

The increment.

BsonObjectId(int, int, short, int)

Initializes a new instance of the BsonObjectId class.

[Obsolete("Use new BsonObjectId(new ObjectId(int timestamp, int machine, short pid, int increment)) instead.")]
public BsonObjectId(int timestamp, int machine, short pid, int increment)

Parameters

timestamp int

The timestamp.

machine int

The machine hash.

pid short

The PID.

increment int

The increment.

BsonObjectId(string)

Initializes a new instance of the BsonObjectId class.

[Obsolete("Use new BsonObjectId(new ObjectId(string value)) instead.")]
public BsonObjectId(string value)

Parameters

value string

The value.