Click or drag to resize

ObjectId Methods

The ObjectId type exposes the following members.

Methods
  NameDescription
Public methodCompareTo
Compares this ObjectId to another ObjectId.
Public methodEquals(Object)
Compares this ObjectId to another object.
(Overrides ValueTypeEquals(Object).)
Public methodEquals(ObjectId)
Compares this ObjectId to another ObjectId.
Public methodStatic memberGenerateNewId
Generates a new ObjectId with a unique value.
Public methodStatic memberGenerateNewId(DateTime)
Generates a new ObjectId with a unique value (with the timestamp component based on a given DateTime).
Public methodStatic memberGenerateNewId(Int32)
Generates a new ObjectId with a unique value (with the given timestamp).
Public methodGetHashCode
Gets the hash code.
(Overrides ValueTypeGetHashCode.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodStatic memberPack
Packs the components of an ObjectId into a byte array.
Public methodStatic memberParse
Parses a string and creates a new ObjectId.
Public methodToByteArray
Converts the ObjectId to a byte array.
Public methodToByteArray(Byte, Int32)
Converts the ObjectId to a byte array.
Public methodToString
Returns a string representation of the value.
(Overrides ValueTypeToString.)
Public methodStatic memberTryParse
Tries to parse a string and create a new ObjectId.
Public methodStatic memberUnpack
Unpacks a byte array into the components of an ObjectId.
Top
Extension Methods
  NameDescription
Public Extension MethodToBson
Serializes an object to a BSON byte array.
(Defined by BsonExtensionMethods.)
Public Extension MethodToBsonDocument
Serializes an object to a BsonDocument.
(Defined by BsonExtensionMethods.)
Public Extension MethodToJson
Serializes an object to a JSON string.
(Defined by BsonExtensionMethods.)
Top
See Also