DB2 Version 9.7 for Linux, UNIX, and Windows

DB2Decimal Members

Represents the DECIMAL DB2 data type. Encapsulates the decimal .NET data type if the maximum precision is 29 digits and the string data type if the maximum precision is 31 digits. The following tables list the members that are exposed by the DB2Decimal structure.

Public Fields

Field Description
public field E The DB2Decimal value for mathematical constant e, which is 2.7182818284590452354.
public field MaxPrecision The maximum precision for DB2Decimal: 31.
public field MaxScale The maximum scale for DB2Decimal: 31.
public field MaxValue The maximum value for DB2Decimal: 9.999999999999999999999999999999E+30.
public field MinusOne The DB2Decimal value of -1.
public field MinValue The minimum value for DB2Decimal: -9.999999999999999999999999999999E+30.
public field Null The null value for DB2Decimal.
public field One The DB2Decimal value of 1.
public field Pi The DB2Decimal value for mathematical constant Pi, which is 3.14159265358979323846.
public field Zero The DB2Decimal value of 0.

Public Constructors

Constructor Description
public method DB2Decimal(decimal) Initializes a new DB2Decimal structure with the specified decimal value.

Public Properties

Property Description
public property IsNull Gets a value that indicates if the value that is stored in the DB2Decimal structure is null.
public property Precision Gets a value that indicates the precision of the DB2Decimal structure's value.
public property Scale Gets a value that indicates the scale of the DB2Decimal structure's value.
public property Value Gets the value that is stored in the DB2Decimal structure.
public property ValueApproximate Gets the approximate value that is stored in the DB2Decimal structure.

Public Methods

Method Description
public method Parse Converts the supplied String value to the DB2Decimal structure.
public method ToString Returns a string that represents the DB2Decimal structure.
public method op_explicit Converts the supplied DB2Decimal structure to a decimal.
public method op_implicit Converts the supplied decimal to DB2Decimal structure.