DB2Decimal.op_explicit Method
Converts the DB2Decimal structure to a double.
This method will throw an OverflowException if
the precision of the DB2Decimal value is greater
than what a .NET decimal type can contain.
- Namespace:
IBM.Data.DB2Types- Assembly:
IBM.Data.DB2(inIBM.Data.DB2.dll)
Syntax
[Visual Basic]
Public Shared Narrowing Operator CType (source As DB2Decimal) As Decimal
[C#]
public static explicit operator decimal (DB2Decimal source)
[C++]
public:
static explicit operator Decimal (DB2Decimal source)
Parameters
- source
- A DB2Decimal structure to be converted to
a
decimal.
Return value
A decimal value
converted from a DB2Decimal instance.
Exceptions
| Exception type | Condition |
|---|---|
| DB2®NullValueException | The DB2Decimal.Null value cannot be assigned to a decimal. |
| DB2TruncateException | Significant figures are lost when assigning the DB2Decimal value to a decimal. |
| OverflowException | The value being assigned to a decimal is too large. |