Operator operator == NamespaceMongoDB.Bson AssemblyMongoDB.Bson.dll operator ==(ObjectId, ObjectId) Compares two ObjectIds. public static bool operator ==(ObjectId lhs, ObjectId rhs) Parameters lhs ObjectId The first ObjectId. rhs ObjectId The other ObjectId. Returns bool True if the two ObjectIds are equal.