Given this MSDN article, we learn that the Common Type System in .Net has this classification of reference types:
"Reference types can be self-describing types, pointer types, or interface types. The type of a reference type can be determined from values of self-describing types. Self-describing types are further split into arrays and class types."
Definition of self-descriptive : serving to describe oneself : being or providing a description of oneself … shedding self-consciousness by filling out name tags that included their occupation and a self-descriptive adjective: Laura, banker, scandalous.
A message that contains data as well as the metadata that describes the format and the meaning (i.e., the syntax and the semantics) of that data. For example, Extensible Markup Language (XML) is a self-describing message format that consists of tag/value pairs.
Nonetheless the data contain tags or other markers to separate semantic elements and enforce hierarchies of records and fields within the data. Therefore, it is also known as self-describing structure.
Types in . NET fall into two categories: value types and reference types. Instances of these are referred to as values and objects, respectively.
A self-describing type is type that is described by metadata available about itself. The most common form are class types. There it's quite easy to show what self-describing means:
The type itself is described by the class definition. e.g. A customer class with a name, age and customerid. The pure data for an instance of this class would be something like:
8%3|*1C U S T O M E R
Only because the environment has the class description containing the metadata you really know that some of this data forms the id, age and name. And to identify the metadata the object content data is merged with a class id so the environment can match the class description with the metadata.
|Class metadata reference: Metadata for the customer class
| |Customer ID: Field
| | |Customer Age: Field
| | ||Customer Name : Field
8%3|*1C U S T O M E R
For arrays it is similar: Array classes contain information about the number of entries as well as type information (see above) about the stored entries.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With