Class Decimal32Ref
Represents the decimal field.
Namespace: OnixS.SimpleBinaryEncoding
Assembly: OnixS.SimpleBinaryEncoding.dll
Syntax
public class Decimal32Ref : BaseComposite, IDecimal, IComposite, IComparable<IDecimal>, IEquatable<Decimal32Ref>
Constructors
Decimal32Ref()
Constructor.
Declaration
public Decimal32Ref()
Decimal32Ref(Int32)
Constructor.
Declaration
public Decimal32Ref(int nullMantissa)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | nullMantissa | Mantissa NULL value. |
Decimal32Ref(Int32, MemoryPointer<Byte>)
Constructor.
Declaration
public Decimal32Ref(int nullMantissa, MemoryPointer<byte> Buffer)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | nullMantissa | Mantissa NULL value. |
MemoryPointer<System.Byte> | Buffer | Buffer, which contains the decimal value. |
Decimal32Ref(System.SByte, Int32)
Constructor.
Declaration
public Decimal32Ref(System.SByte exponent, int nullMantissa)
Parameters
Type | Name | Description |
---|---|---|
System.SByte | exponent | Constant exponent value. |
System.Int32 | nullMantissa | Mantissa NULL value. |
Decimal32Ref(System.SByte, Int32, MemoryPointer<Byte>)
Constructor.
Declaration
public Decimal32Ref(System.SByte exponent, int nullMantissa, MemoryPointer<byte> Buffer)
Parameters
Type | Name | Description |
---|---|---|
System.SByte | exponent | Constant exponent value. |
System.Int32 | nullMantissa | Mantissa NULL value. |
MemoryPointer<System.Byte> | Buffer | Buffer, which contains the decimal value. |
Properties
Exponent
Gets exponent.
Declaration
public System.SByte Exponent { get; set; }
Property Value
Type | Description |
---|---|
System.SByte |
HasValue
True, if the underlying field has not null value, false otherwise.
Declaration
public override bool HasValue { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Overrides
Item[String]
Returns value of composite type field.
Declaration
public override object this[string name] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Field name |
Property Value
Type | Description |
---|---|
System.Object | Value of composite type field |
Overrides
Mantissa
Gets mantissa.
Declaration
public long Mantissa { get; set; }
Property Value
Type | Description |
---|---|
System.Int64 |
Value
Gets decimal value.
Declaration
public decimal Value { get; set; }
Property Value
Type | Description |
---|---|
System.Decimal |
Methods
CompareTo(IDecimal)
Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
Declaration
public int CompareTo(IDecimal other)
Parameters
Type | Name | Description |
---|---|---|
IDecimal | other | An object to compare with this instance. |
Returns
Type | Description |
---|---|
System.Int32 | A value that indicates the relative order of the objects being compared. |
Equals(Decimal32Ref)
Indicates whether the current object is equal to another object of the same type.
Declaration
public bool Equals(Decimal32Ref other)
Parameters
Type | Name | Description |
---|---|---|
Decimal32Ref | other | An object to compare with this object. |
Returns
Type | Description |
---|---|
System.Boolean | true if the current object is equal to the other parameter; otherwise, false. |
Equals(Object)
Indicates whether the current object is equal to another object of the same type.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | An object to compare with this object. |
Returns
Type | Description |
---|---|
System.Boolean | true if the current object is equal to the other parameter; otherwise, false. |
GetHashCode()
Serves as the default hash function.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | A hash code for the current object. |
Reset()
Reset to a null value.
Declaration
public override void Reset()
Overrides
ToString()
Returns the string representation of an object.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | The string representation of an object. |
Operators
Equality(Decimal32Ref, Decimal32Ref)
Declaration
public static bool operator ==(Decimal32Ref left, Decimal32Ref right)
Parameters
Type | Name | Description |
---|---|---|
Decimal32Ref | left | |
Decimal32Ref | right |
Returns
Type | Description |
---|---|
System.Boolean |
GreaterThan(Decimal32Ref, Decimal32Ref)
Declaration
public static bool operator>(Decimal32Ref left, Decimal32Ref right)
Parameters
Type | Name | Description |
---|---|---|
Decimal32Ref | left | |
Decimal32Ref | right |
Returns
Type | Description |
---|---|
System.Boolean |
GreaterThanOrEqual(Decimal32Ref, Decimal32Ref)
Declaration
public static bool operator >=(Decimal32Ref left, Decimal32Ref right)
Parameters
Type | Name | Description |
---|---|---|
Decimal32Ref | left | |
Decimal32Ref | right |
Returns
Type | Description |
---|---|
System.Boolean |
Inequality(Decimal32Ref, Decimal32Ref)
Declaration
public static bool operator !=(Decimal32Ref left, Decimal32Ref right)
Parameters
Type | Name | Description |
---|---|---|
Decimal32Ref | left | |
Decimal32Ref | right |
Returns
Type | Description |
---|---|
System.Boolean |
LessThan(Decimal32Ref, Decimal32Ref)
Declaration
public static bool operator <(Decimal32Ref left, Decimal32Ref right)
Parameters
Type | Name | Description |
---|---|---|
Decimal32Ref | left | |
Decimal32Ref | right |
Returns
Type | Description |
---|---|
System.Boolean |
LessThanOrEqual(Decimal32Ref, Decimal32Ref)
Declaration
public static bool operator <=(Decimal32Ref left, Decimal32Ref right)
Parameters
Type | Name | Description |
---|---|---|
Decimal32Ref | left | |
Decimal32Ref | right |
Returns
Type | Description |
---|---|
System.Boolean |