Why decimal data type isn't primitive?

  • Thread starter Thread starter Arash_89
  • Start date Start date
A

Arash_89

Guest
Hello,

Why decimal data type isn't primitive? decimal is struct and value type.

Almost all value types (strcut) are primitve and reference types are non-primitive. Is this true?

Thanks

Console.WriteLine(typeof(decimal).IsPrimitive); // false
Console.WriteLine(typeof(int).IsPrimitive); // true

Continue reading...
 
Back
Top