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

On this page
    AsDecimal Property
    On this page
    Gets or sets the value of the field as a Decimal. Double, String, Boolean, Int32, Int64, TimeStamp, and Decimal128 values are converted; a Decimal128 value out of the Decimal range, NaN, or Infinity throws System.OverflowException. Returns a null reference (Nothing in Visual Basic) for a missing field; throws System.InvalidOperationException for the other types. The value is written as Decimal128.
    Syntax
    'Declaration
     
    Public Property AsDecimal As Nullable(Of Decimal)
    public Nullable<decimal> AsDecimal {get; set;}
    See Also