dotConnect for MongoDB Documentation
Devart.Data.MongoDB Namespace / MongoDBField Class / AsBoolean Property

On this page
    AsBoolean Property
    On this page
    Gets or sets the value of the field as a Boolean. Numbers and the TimeStamp and Date values give true when not zero, and a string is parsed. Returns a null reference (Nothing in Visual Basic) for a missing field; throws System.InvalidOperationException for the other types. Setting a null reference (Nothing in Visual Basic) makes the field a BSON a null reference (Nothing in Visual Basic).
    Syntax
    'Declaration
     
    Public Property AsBoolean As Nullable(Of Boolean)
    public Nullable<bool> AsBoolean {get; set;}
    See Also