Carl Rosenberger <ca**@db4o.com> wrote:
I find it quite surprising that the System.Decimal Type
is not a primitive data type.
Is this on purpose?
Absolutely.
Why?
Because it's not a primitive type. From Type.IsPrimitive:
"The primitive types are Boolean, Byte, SByte, Int16, UInt16, Int32,
UInt32, Int64, UInt64, Char, Double, and Single."
The CLR doesn't need to have any intrinsic knowledge about the decimal
type - it treats it just as another value type which happens to have
overloaded operators. There are no IL instructions to operate directly
on decimals, for instance.
--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too