mirror of https://github.com/dahall/Vanara.git
Fixed init bugs in CY and DECIMAL
parent
5806d373d3
commit
726a1a146d
|
@ -14,7 +14,7 @@ namespace Vanara
|
|||
|
||||
/// <summary>Initializes a new instance of the <see cref="CY"/> struct.</summary>
|
||||
/// <param name="value">The value.</param>
|
||||
public CY(decimal value) : this(decimal.ToOACurrency(value)) { }
|
||||
public CY(decimal value) { int64 = decimal.ToOACurrency(value); }
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="CY"/> struct.</summary>
|
||||
/// <param name="value">The value.</param>
|
||||
|
|
|
@ -27,7 +27,7 @@ namespace Vanara
|
|||
Mid32 = unchecked((uint)bits[1]);
|
||||
Hi32 = unchecked((uint)bits[2]);
|
||||
sign = value < 0m ? (byte)0x80 : (byte)0;
|
||||
scale = (byte)((unchecked((uint)bits[3]) | 0x00FF0000) >> 16);
|
||||
scale = (byte)((unchecked((uint)bits[3]) & 0x00FF0000) >> 16);
|
||||
}
|
||||
|
||||
/// <summary>Gets the value.</summary>
|
||||
|
|
Loading…
Reference in New Issue