Standard Types

-> Foundational building block is a Type.
-> Metadata about space allocation.
-> Metadata for compile-time type checking.
-> 3 categories of types

  1. Value Types
  2. Reference Types
  3. Pointer Types

Value Types
-> Directly stores values.
-> are stored in stack.
-> A value type cannot be null and exists for as long as the object that contains it does.
-> Objects based on value types are destroyed when they go out of scope.
-> int, enum, byte, decimal, double, float, long

Reference Types
-> store a reference to data.
-> are stored in heap.
-> Objects based on reference types are destroyed at an unspecified time after the last reference to them is removed.
-> string, class, interface, object

Pointer Types
-> Only available in unsafe code.

Leave a Reply

Your email address will not be published. Required fields are marked *