CLR types can be bifurcated as value types and reference types. Primitive
types are some commonly used types like Int32, Single, String, and Boolean
are primitive types. These types generally have aliases defined in
languages. All primitive types except string are value types.
Mujtaba.
> > > Up till now (at least in my opinion) the definition of a primitive type
> has
[quoted text clipped - 25 lines]
> specification uses "primitive" type. You would think that it would be
> consistent. Books also use "primitive" type.
Jon Skeet [C# MVP] - 25 Jan 2005 20:14 GMT
> CLR types can be bifurcated as value types and reference types. Primitive
> types are some commonly used types like Int32, Single, String, and Boolean
> are primitive types. These types generally have aliases defined in
> languages. All primitive types except string are value types.
Actually, String isn't a primitive type. From MSDN:
<quote>
The primitive types are Boolean, Byte, SByte, Int16, UInt16, Int32,
UInt32, Int64, UInt64, Char, Double, and Single.
</quote>

Signature
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Ice - 26 Jan 2005 15:52 GMT
so do you consider "decimal" to be a primitive?
> CLR types can be bifurcated as value types and reference types. Primitive
> types are some commonly used types like Int32, Single, String, and Boolean
[quoted text clipped - 33 lines]
> > specification uses "primitive" type. You would think that it would be
> > consistent. Books also use "primitive" type.
Jon Skeet [C# MVP] - 26 Jan 2005 17:20 GMT
> so do you consider "decimal" to be a primitive?
No - nor is DateTime, which is probably the next most commonly used
value type after the primitives.

Signature
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Ice - 27 Jan 2005 05:00 GMT
so the documentation is wrong or misleading.
eb
> > so do you consider "decimal" to be a primitive?
>
> No - nor is DateTime, which is probably the next most commonly used
> value type after the primitives.
Jon Skeet [C# MVP] - 27 Jan 2005 07:24 GMT
> so the documentation is wrong or misleading.
Well, it just means that the VB.NET idea of a primitive type isn't the
same as the CLR's idea of a primitive type.
That's somewhat confusing, but may well be historical.

Signature
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Abubakar - 14 Feb 2005 06:50 GMT
> so do you consider "decimal" to be a primitive?
u can check it with following code:
Dim t As Type = GetType(Decimal)
Console.WriteLine("primtive {0}.", t.IsPrimitive)
It'll return false for decimal.
Ab.
Abubakar - 14 Feb 2005 06:48 GMT
Dim t As Type = GetType(String)
Console.WriteLine("primtive {0}.", t.IsPrimitive)
will display False.
Ab.
> CLR types can be bifurcated as value types and reference types. Primitive
> types are some commonly used types like Int32, Single, String, and Boolean
[quoted text clipped - 38 lines]
> > specification uses "primitive" type. You would think that it would be
> > consistent. Books also use "primitive" type.