Table of Contents

Method IsDatabaseNameValid

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

IsDatabaseNameValid(string, out string)

Checks whether a given database name is valid on this server.

public virtual bool IsDatabaseNameValid(string databaseName, out string message)

Parameters

databaseName string

The database name.

message string

An error message if the database name is not valid.

Returns

bool

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