ObjectId Methods |
The ObjectId type exposes the following members.
Name | Description | |
---|---|---|
CompareTo |
Compares this ObjectId to another ObjectId.
| |
Equals(Object) |
Compares this ObjectId to another object.
(Overrides ValueTypeEquals(Object).) | |
Equals(ObjectId) |
Compares this ObjectId to another ObjectId.
| |
GenerateNewId |
Generates a new ObjectId with a unique value.
| |
GenerateNewId(DateTime) |
Generates a new ObjectId with a unique value (with the timestamp component based on a given DateTime).
| |
GenerateNewId(Int32) |
Generates a new ObjectId with a unique value (with the given timestamp).
| |
GetHashCode |
Gets the hash code.
(Overrides ValueTypeGetHashCode.) | |
GetType | (Inherited from Object.) | |
Pack |
Packs the components of an ObjectId into a byte array.
| |
Parse |
Parses a string and creates a new ObjectId.
| |
ToByteArray |
Converts the ObjectId to a byte array.
| |
ToByteArray(Byte, Int32) |
Converts the ObjectId to a byte array.
| |
ToString |
Returns a string representation of the value.
(Overrides ValueTypeToString.) | |
TryParse |
Tries to parse a string and create a new ObjectId.
| |
Unpack |
Unpacks a byte array into the components of an ObjectId.
|
Name | Description | |
---|---|---|
ToBson |
Serializes an object to a BSON byte array.
(Defined by BsonExtensionMethods.) | |
ToBsonDocument |
Serializes an object to a BsonDocument.
(Defined by BsonExtensionMethods.) | |
ToJson |
Serializes an object to a JSON string.
(Defined by BsonExtensionMethods.) |