I\'d like to be able to get the bits from a System.Decimal
value and then convert that to the string representation of the value, much like Decimal.ToStri
You can use the Decimal constructor Decimal(Int32[]) to convert your value back:
Decimal Constructor (Int32[])
Initializes a new instance of Decimal to a decimal value represented in binary and contained in a specified array.
Afterwards, you can use ToString
if you want.
Example:
decimal d = 1403.45433M;
int[] nDecimalBits = decimal.GetBits(d);
decimal d2 = new decimal(nDecimalBits);
string s = d2.ToString();