# OracleNumber Structure

**.NET Framework 4**

Represents a fixed precision and scale numeric value between -10 27 -1 and 10 27 -1 to be stored in or retrieved from a database.

**Namespace:**System.Data.OracleClient

**Assembly:**System.Data.OracleClient (in System.Data.OracleClient.dll)

The OracleNumber type exposes the following members.

Name | Description | |
---|---|---|

OracleNumber(Decimal) | Initializes a new instance of the OracleNumber structure using the supplied Decimal value. | |

OracleNumber(Double) | Initializes a new instance of the OracleNumber using the supplied double precision value. | |

OracleNumber(Int32) | Initializes a new instance of the OracleNumber structure using the supplied integer value. | |

OracleNumber(Int64) | Initializes a new instance of the OracleNumber structure using the supplied long integer value. | |

OracleNumber(OracleNumber) | Initializes a new instance of the OracleNumber structure using the supplied OracleNumber. |

Name | Description | |
---|---|---|

Abs | Gets the absolute value of the OracleNumber parameter. | |

Acos | Calculates the inverse hyperbolic cosine of an OracleNumber. | |

Add | Calculates the sum of the two OracleNumber structures. | |

Asin | Calculates the inverse hyperbolic sine of an OracleNumber. | |

Atan | Calculates the inverse hyperbolic tangent of an OracleNumber. | |

Atan2 | Calculates the inverse hyperbolic tangent of two OracleNumber structures. | |

Ceiling | Returns the smallest whole number greater than or equal to the specified OracleNumber structure. | |

CompareTo | Compares this instance of the OracleNumber structure to the supplied object and returns an indication of their relative values. | |

Cos | Calculates the cosine of an OracleNumber. | |

Cosh | Calculates the hyperbolic cosine of an OracleNumber. | |

Divide | Calculates the results of dividing the first OracleNumber structure by the second. | |

Equals(Object) | Compares the supplied object parameter to the Value property of the OracleNumber object. (Overrides ValueType.Equals(Object).) | |

Equals(OracleNumber, OracleNumber) | Performs a logical comparison of the two OracleNumber structures to determine if they are equal. | |

Exp | Calculates e raised to the power of an OracleNumber. The constant e equals 2.71828182845904, the base of the natural logarithm. | |

Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |

Floor | Rounds a specified OracleNumber number to the next lower whole number. | |

GetHashCode | Returns the hash code for this instance of the OracleNumber structure. (Overrides ValueType.GetHashCode().) | |

GetType | Gets the Type of the current instance. (Inherited from Object.) | |

GreaterThan | Performs a logical comparison of two OracleNumber structures to determine whether the first is greater than the second. | |

GreaterThanOrEqual | Performs a logical comparison of the two OracleNumber parameters to determine whether the first is greater than or equal to the second. | |

LessThan | Performs a logical comparison of two OracleNumber structures to determine whether the first is less than the second. | |

LessThanOrEqual | Performs a logical comparison of the two OracleNumber parameters to determine whether the first is less than or equal to the second. | |

Log(OracleNumber) | Calculates natural logarithm of an OracleNumber. Natural logarithms are based on the constant e (2.71828182845904). | |

Log(OracleNumber, OracleNumber) | Calculates an OracleNumber to the base you specify. | |

Log(OracleNumber, Int32) | Calculates an OracleNumber to the base you specify. | |

Log10 | Calculates the base 10 logarithm of a number. | |

Max | Returns the larger of the two OracleNumber parameter values. | |

MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |

Min | Returns the smaller of the two OracleNumber parameter values. | |

Modulo | Calculates the modulus from dividing the first OracleNumber structure by the second. | |

Multiply | Calculates the product of the two OracleNumber parameters. | |

Negate | Negates the value of the OracleNumber parameter. | |

NotEquals | Performs a logical comparison of the two OracleNumber parameters to determine whether they are not equal. | |

Parse | Converts the String representation of a number to its OracleNumber equivalent. | |

Pow(OracleNumber, OracleNumber) | Calculates the result of raising a specified OracleNumber structure to the power specified by a second OracleNumber structure. | |

Pow(OracleNumber, Int32) | Calculates the result of raising a specified OracleNumber structure to the power specified by an Int32 structure. | |

Round | Gets the number nearest the specified OracleNumber structure's value with the specified precision. | |

Shift | Shifts the specified number of digits to the left or right. | |

Sign | Gets a value indicating the sign of an OracleNumber structure's Value property. | |

Sin | Calculates the sine of an OracleNumber. | |

Sinh | Calculates the hyperbolic sine of an OracleNumber. | |

Sqrt | Calculates the square root of the OracleNumber parameter. | |

Subtract | Calculates the result of subtracting the second OracleNumber structure from the first. | |

Tan | Calculates the tangent of an OracleNumber. | |

Tanh | Calculates the hyperbolic tangent of an OracleNumber. | |

ToString | Converts this OracleNumber structure to String. (Overrides ValueType.ToString().) | |

Truncate | Truncates the specified OracleNumber structure's value to the desired position. |

Name | Description | |
---|---|---|

Addition | Calculates the sum of the two OracleNumber structures. | |

Division | Calculates the results of dividing the first OracleNumber structure by the second. | |

Equality | Performs a logical comparison of the two OracleNumber structures to determine whether they are equal. | |

Explicit(Decimal to OracleNumber) | Converts the supplied Decimal structure to an OracleNumber structure. | |

Explicit(Double to OracleNumber) | Converts the supplied Double structure to an OracleNumber structure. | |

Explicit(Int32 to OracleNumber) | Converts the supplied Int32 structure to an OracleNumber structure. | |

Explicit(Int64 to OracleNumber) | Converts the supplied Int64 structure to an OracleNumber structure. | |

Explicit(OracleNumber to Int32) | Converts the OracleNumber structure to Int32. | |

Explicit(OracleNumber to Int64) | Converts the OracleNumber structure to Int64. | |

Explicit(OracleNumber to Decimal) | Converts the OracleNumber structure to Decimal. | |

Explicit(OracleNumber to Double) | Converts the OracleNumber structure to Double. | |

Explicit(String to OracleNumber) | Converts the supplied String to an OracleNumber structure. | |

GreaterThan | Performs a logical comparison of two OracleNumber structures to determine whether the first is greater than the second. | |

GreaterThanOrEqual | Performs a logical comparison of the two OracleNumber parameters to determine whether the first is greater than or equal to the second. | |

Inequality | Performs a logical comparison of the two OracleNumber parameters to determine whether they are equal. | |

LessThan | Performs a logical comparison of two OracleNumber structures to determine whether the first is less than the second. | |

LessThanOrEqual | Performs a logical comparison of the two OracleNumber parameters to determine whether the first is less than or equal to the second. | |

Modulus | Calculates the remainder left over from dividing an OracleNumber structure by a second OracleNumber structure. | |

Multiply | Calculates the product of two OracleNumber structures. | |

Subtraction | Calculates the result of subtracting the second OracleNumber structure from the first. | |

UnaryNegation | Negates the OracleNumber structure. |

Name | Description | |
---|---|---|

E | Returns the value e-2.718. | |

MaxPrecision | A constant representing the largest possible value for precision comparison. | |

MaxScale | A constant representing the maximum value for scale comparison. | |

MaxValue | A constant representing the maximum value of an OracleNumber structure. | |

MinScale | A constant representing the minimum value for scale comparison. | |

MinusOne | Returns the value -1. | |

MinValue | A constant representing the minimum value for an OracleNumber structure. | |

Null | Represents a null value that can be assigned to the Value property of an instance of the OracleNumber class. | |

One | Returns the value 1. | |

PI | Returns the value of pi-3.1415926535897932384626433832795028842. | |

Zero | Returns the value 0. |

To obtain an OracleNumber object, call the GetOracleNumber method.

Oracle numeric data types can store up to 27 decimal digits of precision. When converting Oracle numeric values to common language runtime data types, the Oracle value might be too large. Conversely, when converting a numeric value of a common language runtime data types to an OracleNumber, the numeric value may be either too large or too high precision for the OracleNumber. Either of these cases will cause an Oracle ORA-22053 overflow error. If your Oracle database might contain large values, you should use the OracleNumber data type. You can then convert to the common language runtime data type explicitly, and catch or handle any errors.

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.