Method TryParse
TryParse(string, out BsonObjectId)
Tries to parse a string and create a new BsonObjectId.
[Obsolete("Use ObjectId.TryParse instead.")]
public static bool TryParse(string s, out BsonObjectId value)
Parameters
s
stringThe string value.
value
BsonObjectIdThe new BsonObjectId.
Returns
- bool
True if the string was parsed successfully.