Name for metatypes

  • Thread starter Thread starter ERE
  • Start date Start date
E

ERE

Hi,

I have a question about nomenclature.

When you declare a class, or any of the user-defined types, you are
declaring a TYPE, that can then be used throughout your program. E.g., the
following declares a new type called MyClass.

class MyClass
{
...
}

So class, struct, array, enum, delegate, and interface are not actual
types -- they are "metatypes" for creating new types. Is there a formal
term for these metatypes? or is that it -- metatypes?

Thanks,
Dan
 
They are all just "types", from the perspective of the CRL.

Structs, arrays, enums, and delegates are all first class "types" that
inherit from something. It is only the syntax of the language that hides
that fact. For instance, declaring a delegate as "public void
MyDelegate();" still creates a class in the CRL.

The only weird thing are interfaces, but they are still considered types
even though they are not classes and do not inherit from another class.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top