VoltDB.Data.Client.VoltDecimal.ToBytes C# (CSharp) Method

ToBytes() public method

Returns the bytes for thie BigDecimal instance, for serialization.
public ToBytes ( ) : byte[]
return byte[]
        public byte[] ToBytes()
        {
            return this.Value.ToBytes(FixedScale);
        }

Usage Example

 /// <summary>
 /// Writes a BigDecimal.
 /// </summary>
 /// <param name="value">Value to write.</param>
 /// <returns>The serializer instance, ready to chain the next command.</returns>
 public Serializer Write(VoltDecimal value)
 {
     writer.Write(value.ToBytes(), 0, 16);
     return this;
 }