Fixed init bugs in CY and DECIMAL

pull/180/head
dahall 2020-11-12 22:36:08 -07:00
parent 5806d373d3
commit 726a1a146d
2 changed files with 2 additions and 2 deletions

View File

@ -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>

View File

@ -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>