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

IsVoltDBNull() public method

Returns whether the variable corresponds to a null VoltDB value.
public IsVoltDBNull ( ) : bool
return bool
        public bool IsVoltDBNull()
        {
            return Value == VoltDecimal.NullValue;
        }

Usage Example

        /// <summary>
        /// Reads a Decimal (VoltDB:Decimal).
        /// </summary>
        /// <remarks>No .NET support for the equivalent BigDecimal data type from Java. At this time, this data type is
        /// not supported by the .NET client library.</remarks>
        /// <returns>Value read from the underlying byte buffer.</returns>
        public VoltDecimal?ReadVoltDecimalN()
        {
            // Remark: value = (read == -170141183460469231731687303715884105728.) ? null : read;
            byte[] buffer = new byte[16];
            Buffer.BlockCopy(this.Input, this.Position, buffer, 0, 16);
            this.Position += 16;
            VoltDecimal result = new VoltDecimal(buffer);

            if (result.IsVoltDBNull())
            {
                return(null);
            }
            return(result);
        }
All Usage Examples Of VoltDB.Data.Client.VoltDecimal::IsVoltDBNull