Public const double MinValue
Public const double public const double NegativeInfinity public const double PositiveInfinity
Epsilon
NaN
,
Double
,
Double
,
,
,
Decimal
Decimal , , . , , , decimal , #. , decimal .
Decimal . .
public Decimal(int ) public Decimal(uint ) public Decimal(long ) public Decimal(ulong ) public Decimal(float ) public Decimal(double )
Decimal .
, Decimal .
public Decimal(int lo, int mid, int hi, bool IsNegative, byte scale)
. 96- , , . , 96- 32- lo, mid hi; IsNegative, false , true ; scale, 0 28. 10 (.. 10scaJe), .
Decimal , , .
public Decimal(int[] bits)
int bits 96- ; 31- bits [3] (0 , 1 ); 16-23 .
Decimal : IComparable, IComparable<decimal>, IConvertible, IFormattable, IEquatable<decimal>, IDeserializationCallback.
decimal .
// .
Using System;
|
|
class CreateDec {
static void Main() {
decimal d = new decimal(12345, 0, 0, false, 2);
Console.WriteLine(d);
}
}
.
123.45
96- 12345. .
, Decimal, ._21.7, . 21.8. , Decimal , . , , 3.
21. System 737 21.7. , Decimal
public static decimal Add(decimal "dl, decimal d2)
dl + d2
Public static decimal
,
Ceiling(d)
decimal d. , d 1,02, Ceiling () 2,0. d -1,02, Ceiling () -1
Public static int
dl
Compare(decimal dl, decimal d2)
d2. , ; , dl d2; , , , dl d2