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

On this page
    AsFloat Property
    On this page
    Gets or sets the value of the field as a single-precision floating-point number. Double, String, Boolean, Int32, Int64, TimeStamp, and Decimal128 values are converted. Returns a null reference (Nothing in Visual Basic) for a missing field; throws System.InvalidOperationException for the other types. The value is written as Double.
    Syntax
    'Declaration
     
    Public Property AsFloat As Nullable(Of Single)
    public Nullable<float> AsFloat {get; set;}
    See Also