AfDecimal Class Reference
[C# bindings for LibAfDal layer]


Detailed Description

Managed implementation for AfDalDecimal object.

This class implementes all stuff supported by AfDal Decimal module from C layer but providing an managed implementation.


Public Types

enum  Separator { Dot = 0, Comma = 1 }
 Enumerator to allow Af-Arch# programmers to chose decimal separator. More...

Public Member Functions

 AfDecimal (double value, int precision)
 Constructor from a double value allow to set the precision expected.
 AfDecimal (double value)
 Constructor from a double value assuming a default precision.
 AfDecimal (string value)
 Constructor from a string value.
 AfDecimal (IntPtr value)
 Constructor from a raw unmanaged AfDalDecimal class.
void Dispose ()
 Allows to dispose current internal unmanaged resources allocated without waiting for the GC to finalize the object.
override bool Equals (object other)
 Allows to compare the given AfDecimal object against other.
bool IsNegative ()
 Allows to check if the given AfDecimal object is negative.
bool IsPositive ()
 Allows to check if the given AfDecimal object is positive.
void MakeNegative ()
 Translate the given AfDecimal into a negative value You can also check C layer function at afdal_decimal_make_negative.
void MakePositive ()
 Translate the given AfDecimal into a positive value.
void Modify (double value)
 Modify current internal value using the given double value.
void Modify (string value)
 Modify current internal value using the given string value.
string Normalize ()
 Returns the AfDecimal string normalized function.
double ToDouble ()
 Gets double representation from the given AfDecimal without returning a conversion status.
double ToDouble (out bool success)
 Allow to get current double representation from the given AfDecimal value.
override string ToString ()
 Returns current string representation for the given AfDecimal object.

Static Public Member Functions

static bool Check (string value)
 Check method to allow checking it the given string value is already in local format.
static void Dispose (IntPtr rawDecimal)
 Dispose a raw AfDalDecimal reference.
static Separator GetActualDecimalSeparator ()
 Allows to get current AfDecimal separator for all instances created.
static void SetDecimalSeparator (Separator sep)
 Allows to set current AfDecimal separator for all instances created.

Data Fields

IntPtr Value
 A pointer to actual AfDalDecimal pointer holded by this class.

Data Structures

class  AfDecimalInvalidFormat
 Exception thrown when AfDecimal class have detected invalid format errors. More...