14.4.1 OracleDecimal Members

OracleDecimal members are listed in the following tables:

OracleDecimal Constructors

OracleDecimal constructors are listed in Table 14-40

Table 14-40 OracleDecimal Constructors

Constructor Description

OracleDecimal Constructors

Instantiates a new instance of OracleDecimal structure (Overloaded)

OracleDecimal Static Fields

The OracleDecimal static fields are listed in Table 14-41.

Table 14-41 OracleDecimal Static Fields

Field Description

MaxPrecision

A constant representing the maximum precision, which is 38

MaxScale

A constant representing the maximum scale, which is 127

MaxValue

A constant representing the maximum value for this structure, which is 9.9…9 x 10125

MinScale

A constant representing the minimum scale, which is -84

MinValue

A constant representing the minimum value for this structure, which is -1.0 x 10130

NegativeOne

A constant representing the negative one value

Null

Represents a null value that can be assigned to an OracleDecimal instance

One

A constant representing the positive one value

Pi

A constant representing the numeric Pi value

Zero

A constant representing the zero value

OracleDecimal Static (Comparison) Methods

The OracleDecimal static (comparison) methods are listed in Table 14-42.

Table 14-42 OracleDecimal Static (Comparison) Methods

Methods Description

Equals

Determines if two OracleDecimal values are equal (Overloaded)

GreaterThan

Determines if the first of two OracleDecimal values is greater than the second

GreaterThanOrEqual

Determines if the first of two OracleDecimal values is greater than or equal to the second

LessThan

Determines if the first of two OracleDecimal values is less than the second

LessThanOrEqual

Determines if the first of two OracleDecimal values is less than or equal to the second.

NotEquals

Determines if two OracleDecimal values are not equal

OracleDecimal Static (Manipulation) Methods

The OracleDecimal static (manipulation) methods are listed in Table 14-43.

Table 14-43 OracleDecimal Static (Manipulation) Methods

Methods Description

Abs

Returns the absolute value of an OracleDecimal

Add

Adds two OracleDecimal structures

AdjustScale

Returns a new OracleDecimal with the specified number of digits and indicates whether or not to round or truncate the number if the scale is less than original

Ceiling

Returns a new OracleDecimal structure with its value set to the ceiling of an OracleDecimal structure

ConvertToPrecScale

Returns a new OracleDecimal structure with a new precision and scale

Divide

Divides one OracleDecimal value by another

Floor

Returns a new OracleDecimal structure with its value set to the floor of an OracleDecimal structure

Max

Returns the maximum value of the two supplied OracleDecimal structures

Min

Returns the minimum value of the two supplied OracleDecimal structures

Mod

Returns a new OracleDecimal structure with its value set to the modulus of two OracleDecimal structures

Multiply

Returns a new OracleDecimal structure with its value set to the result of multiplying two OracleDecimal structures

Negate

Returns a new OracleDecimal structure with its value set to the negation of the supplied OracleDecimal structure

Parse

Converts a string to an OracleDecimal

Round

Returns a new OracleDecimal structure with its value set to that of the supplied OracleDecimal structure and rounded off to the specified place

SetPrecision

Returns a new OracleDecimal structure with a new specified precision.

Shift

Returns a new OracleDecimal structure with its value set to that of the supplied OracleDecimal structure, and its decimal place shifted to the specified number of places to the right

Sign

Determines the sign of an OracleDecimal structure

Sqrt

Returns a new OracleDecimal structure with its value set to the square root of the supplied OracleDecimal structure

Subtract

Returns a new OracleDecimal structure with its value set to result of subtracting one OracleDecimal structure from another

Truncate

Truncates the OracleDecimal at a specified position

OracleDecimal Static (Logarithmic) Methods

The OracleDecimal static (logarithmic) methods are listed in Table 14-44.

Table 14-44 OracleDecimal Static (Logarithmic) Methods

Methods Description

Exp

Returns a new OracleDecimal structure with its value set to e raised to the supplied power

Log

Returns the supplied OracleDecimal structure with its value set to the logarithm of the supplied OracleDecimal structure (Overloaded)

Pow

Returns a new OracleDecimal structure with its value set to the supplied OracleDecimal structure raised to the supplied power (Overloaded)

OracleDecimal Static (Trigonometric) Methods

The OracleDecimal static (trigonometric) methods are listed in Table 14-45.

Table 14-45 OracleDecimal Static (Trigonometric) Methods

Methods Description

Acos

Returns an angle in radians whose cosine is the supplied OracleDecimal structure

Asin

Returns an angle in radians whose sine is the supplied OracleDecimal structure

Atan

Returns an angle in radians whose tangent is the supplied OracleDecimal structure

Atan2

Returns an angle in radians whose tangent is the quotient of the two supplied OracleDecimal structures

Cos

Returns the cosine of the supplied angle in radians

Sin

Returns the sine of the supplied angle in radians

Tan

Returns the tangent of the supplied angle in radians

Cosh

Returns the hyperbolic cosine of the supplied angle in radians

Sinh

Returns the hyperbolic sine of the supplied angle in radians

Tanh

Returns the hyperbolic tangent of the supplied angle in radians

OracleDecimal Static (Comparison) Operators

The OracleDecimal static (comparison) operators are listed in Table 14-46.

Table 14-46 OracleDecimal Static (Comparison) Operators

Operator Description

operator +

Adds two OracleDecimal values

operator /

Divides one OracleDecimal value by another

operator ==

Determines if the two OracleDecimal values are equal

operator >

Determines if the first of two OracleDecimal values is greater than the second

operator >=

Determines if the first of two OracleDecimal values is greater than or equal to the second

operator !=

Determines if the two OracleDecimal values are not equal

operator <

Determines if the first of two OracleDecimal values is less than the second

operator <=

Determines if the first of two OracleDecimal values is less than or equal to the second

operator *

Multiplies two OracleDecimal structures

operator -

Subtracts one OracleDecimal structure from another

operator -

Negates an OracleDecimal structure

operator%

Returns a new OracleDecimal structure with its value set to the modulus of two OracleDecimal structures.

OracleDecimal Static Operators (Conversion from .NET Type to OracleDecimal)

The OracleDecimal static operators (Conversion from .NET Type to OracleDecimal) are listed in Table 14-47.

Table 14-47 OracleDecimal Static Operators (Conversion from .NET Type to OracleDecimal)

Operator Description

implicit operator OracleDecimal

Converts an instance value to an OracleDecimal structure (Overloaded)

explicit operator OracleDecimal

Converts an instance value to an OracleDecimal structure (Overloaded)

OracleDecimal Static Operators (Conversion from OracleDecimal to .NET)

The OracleDecimal static operators (Conversion from OracleDecimal to .NET) are listed in Table 14-48.

Table 14-48 OracleDecimal Static Operators (Conversion from OracleDecimal to .NET)

Operator Description

explicit operator byte

Returns the byte representation of the OracleDecimal value

explicit operator decimal

Returns the decimal representation of the OracleDecimal value

explicit operator double

Returns the double representation of the OracleDecimal value

explicit operator short

Returns the short representation of the OracleDecimal value

explicit operator int

Returns the int representation of the OracleDecimal value

explicit operator long

Returns the long representation of the OracleDecimal value

explicit operator float

Returns the float representation of the OracleDecimal value

OracleDecimal Properties

The OracleDecimal properties are listed in Table 14-49.

Table 14-49 OracleDecimal Properties

Properties Description

BinData

Returns a byte array that represents the Oracle NUMBER in Oracle internal format

Format

Specifies the format for ToString()

IsInt

Indicates whether or not the current instance is an integer

IsNull

Indicates whether or not the current instance has a null value

IsPositive

Indicates whether or not the current instance is greater than 0

IsZero

Indicates whether or not the current instance has a zero value

Value

Returns a decimal value

OracleDecimal Instance Methods

The OracleDecimal instance methods are listed in Table 14-50.

Table 14-50 OracleDecimal Instance Methods

Method Description

CompareTo

Compares the current instance to the supplied object and returns an integer that represents their relative values

Equals

Determines whether or not an object is an instance of OracleDecimal, and whether or not the value of the object is equal to the current instance (Overloaded)

GetHashCode

Returns a hash code for the current instance

GetType

Inherited from System.Object

ToByte

Returns the byte representation of the current instance

ToDouble

Returns the double representation of the current instance

ToInt16

Returns the Int16 representation of the current instance

ToInt32

Returns the Int32 representation of the current instance

ToInt64

Returns the Int64 representation of the current instance

ToSingle

Returns the Single representation of the current instance

ToString

Overloads Object.ToString()

Returns the string representation of the current instance