Table of Contents

Method TryParse

Namespace
MongoDB.Bson
Assembly
MongoDB.Bson.dll

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 string

The string value.

value BsonObjectId

The new BsonObjectId.

Returns

bool

True if the string was parsed successfully.