I’m writing an application using Roslyn to syntactically and semantically analyse C# source code. For each type defined in the source code being analysed, I would like to store whether it’s a reference type (a class), a value type (a struct) or an interface.
What’s the appropriate/official term for a type’s type?
Example:
class A
{
//This type's type (A's type) is 'class' (i.e. a reference type).
}
If you want to know the official name, look into the official source: the C# language specification. Quoting from there (§1.3 Types and variables; emphasis mine):
Then there is a table that describes those groups of types as category, and also this quote:
Although later (in §4 Types):
To sum up, the specification calls them categories of types, although its usage of that term is not very consistent.