Method Convert
| MongoDB CSharp Driver API Reference (original) (raw)
Namespace
Assembly
MongoDB.Driver.dll
Convert<TFrom, TTo>(TFrom, ConvertOptions)
Converts a value from one type to another using the $convert aggregation operator.
public static TTo Convert<TFrom, TTo>(TFrom value, ConvertOptions<TTo> options)Parameters
value TFrom
The value to convert.
options ConvertOptions
The conversion options.
Returns
TTo
The converted value.
Type Parameters
TFrom
The type of the input value.
TTo
The type of the output value.
Remarks
Not all conversions are supported by the $convert operator.