What's special about .NET primitive types?

I was reading about msdn primitive types , but then I came across this answer to a StackOverflow question about primitive types. They seem to be slightly different from each other.

According to the msdn documentation, it contains several advantages of primitive types:

  • Primitive types accept literal values.
  • Primitive types can be declared as constant values.
  • The operands of an expression consisting of all primitive types can be compiled into a constant expression.

However, this part differs in that StackOverflow claims to be System.String

, for example, not a primitive type. It makes sense: typeof(System.String).IsPrimitive

gives false

. And StackOverflow's answer points to the CLI spec: ECMA 335 (link broken) as the link source. This leads me to think that the msdn documentation is not entirely accurate. If so, what makes primitive types so special?

+3


source to share


1 answer


The MSDN link points to an ancient page about Visual Basic.NET 2003. In the current specification String has been removed from the list of primitive types, the Visual Basic Language Reference does not mention String as a primitive type, even for VB.NET 2003.



I suspect this was a documentation error in 2003

+1


source







All Articles