Method Create

| MongoDB CSharp Driver API Reference (original) (raw)

Namespace

MongoDB.Driver

Assembly

MongoDB.Driver.dll

Create(T)

Creates an instance of an optional parameter with a value.

public static Optional<T> Create<T>(T value)

Parameters

value T

The value.

Returns

Optional

An instance of an optional parameter with a value.

Type Parameters

T

The type of the optional parameter.

Remarks

This helper method can be used when the implicit conversion doesn't work (due to compiler limitations).