MongoDB.Bson.IO.BsonWriter.WriteDouble C# (CSharp) Method

WriteDouble() public abstract method

Writes a BSON Double to the writer.
public abstract WriteDouble ( double value ) : void
value double The Double value.
return void
        public abstract void WriteDouble(double value);

Same methods

BsonWriter::WriteDouble ( string name, double value ) : void

Usage Example

        public override void Serialize(BsonWriter bsonWriter, System.Type nominalType, object value, IBsonSerializationOptions options)
        {
            var rectangle = (Rectangle) value;

            bsonWriter.WriteStartDocument();
            WriteVector(bsonWriter,"Min",rectangle.Min);
            WriteVector(bsonWriter,"Max",rectangle.Max);
            
            bsonWriter.WriteDouble("Width",rectangle.Width);
            bsonWriter.WriteDouble("Height",rectangle.Height);
            bsonWriter.WriteEndDocument();
        }
All Usage Examples Of MongoDB.Bson.IO.BsonWriter::WriteDouble