Table of Contents

Method TryParse

Namespace
MongoDB.Bson
Assembly
MongoDB.Bson.dll

TryParse(string, out ObjectId)

Tries to parse a string and create a new ObjectId.

public static bool TryParse(string s, out ObjectId objectId)

Parameters

s string

The string value.

objectId ObjectId

The new ObjectId.

Returns

bool

True if the string was parsed successfully.