Click or drag to resize

IMongoDatabaseListCollectionNamesAsync Method (ListCollectionNamesOptions, CancellationToken)

Lists the names of all the collections in the database.

Namespace:  MongoDB.Driver
Assembly:  MongoDB.Driver (in MongoDB.Driver.dll) Version: 2.17.0+b316340e6cc3a8bfc8638dc31b54fbbfe41bfcb2
Task<IAsyncCursor<string>> ListCollectionNamesAsync(
	ListCollectionNamesOptions options = null,
	CancellationToken cancellationToken = default


options (Optional)
Type: MongoDB.DriverListCollectionNamesOptions
The options.
cancellationToken (Optional)
Type: System.ThreadingCancellationToken
The cancellation token.

Return Value

Type: TaskIAsyncCursorString
A Task whose result is a cursor.
See Also