Table of Contents

Method IsCollectionNameValid

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.Legacy.dll

IsCollectionNameValid(string, out string)

Checks whether a given collection name is valid in this database.

public virtual bool IsCollectionNameValid(string collectionName, out string message)

Parameters

collectionName string

The collection name.

message string

An error message if the collection name is not valid.

Returns

bool

True if the collection name is valid; otherwise, false.