What is the (official) term for type type?

I am writing an application using Roslyn to parse C # source code. For each type defined in the source code being analyzed, I would like to keep whether it is a reference type (class), value type (structure) or interface.

What is the appropriate / official term for type type?

Example:

class A { //This type type (A type) is 'class' (ie a reference type). } 
+7
source share
3 answers

If you want to know the official name, look at the official source: C # language specification. Quoting from there (§ 1.3 Types and variables, focus):

In C #, there are two types of types : value types and link types. [...]

C # value types are further subdivided into simple types, enumeration types, structure types, and NULL types, and C # reference types are further subdivided into class types, interface types, array types, and delegate types.

Then there is a table that describes these type groups as category , as well as this quote:

Five categories of C types are user-defined: class types, structure types, interface types, enumeration types, and delegate types.

Although later (in §4 Types):

C # language types fall into two main categories : value types and reference types.

To summarize, the specification calls them type categories, although the use of this term is not very consistent.

+11
source

In type theory, a type of a type is usually called its type. This primarily describes the type of parameterization of the type, although it can be used for other classifications. But I'm not sure if it applies naturally to the classification that you have in mind here. C # seems to have no “official” term for this.

+3
source

I saw how we used the “view” in the Roslyn source code, since “there are 5 possible types of types that can be declared”. However, I do not think that there is an officially defined term for this. I would use "type" or "kind."

+2
source

All Articles