Is String a primitive type?

后端 未结 10 1214
难免孤独
难免孤独 2020-11-27 18:36

I am curious about the string and primitive types. Article like this says string is primitive type. However second article on MSDN does not list string as primitive type.

10条回答
  •  庸人自扰
    2020-11-27 18:45

    Under Microsoft's definition of "primitive", string is not considered a primitive type. On the other hand, Microsoft tends to use terminology without really formulating a clear or consistent definition (e.g. "unmanaged resource"), and one could usefully define "primitive" to include "String", "Array", and "Object", since in their absence there would be no way to define types that could emulate them efficiently.

提交回复
热议问题