Method Field
Field<TDocument, TField>(TDocument, string, IBsonSerializer<TField>)
Gets the value of a field in a document.
public static TField Field<TDocument, TField>(TDocument document, string fieldName, IBsonSerializer<TField> fieldSerializer)
Parameters
documentTDocumentThe document.
fieldNamestringThe field name.
fieldSerializerIBsonSerializer<TField>The field serializer.
Returns
- TField
The value of the field.
Type Parameters
TDocumentThe type of the document.
TFieldThe type of the field.