我从decimal.GetBits()得到int []。如何从int []中获取十进制值?
答案 0 :(得分:3)
使用Decimal(Int32[] bits)
构造函数。像这样:
Decimal d = new Decimal( 123 );
Int32[] bits = d.GetBits();
Decimal e = new Decimal( bits );
Debug.Assert( d == e );
答案 1 :(得分:1)
答案 2 :(得分:1)
decimal dec = new decimal(decimalArray);