Method GenerateNewId
GenerateNewId()
Generates a new ObjectId with a unique value.
public static ObjectId GenerateNewId()Returns
- ObjectId
- An ObjectId. 
GenerateNewId(DateTime)
Generates a new ObjectId with a unique value (with the timestamp component based on a given DateTime).
public static ObjectId GenerateNewId(DateTime timestamp)Parameters
- timestampDateTime
- The timestamp component (expressed as a DateTime). 
Returns
- ObjectId
- An ObjectId. 
GenerateNewId(int)
Generates a new ObjectId with a unique value (with the given timestamp).
public static ObjectId GenerateNewId(int timestamp)Parameters
- timestampint
- The timestamp component. 
Returns
- ObjectId
- An ObjectId.