Value Types

Reference Types

Definition: A data type is a value type if it holds the data within its own memory allocation. A reference type contains a pointer to another memory location that holds the data.
Includes:
  • All numeric data types

  • Boolean , Char, and Date

  • All structures, even if their members are reference types

  • Enumerations, since their underlying type is always SByte, Short, Integer, Long, Byte, UShort, UInteger, or ULong

  • String

  • All arrays, even if their elements are value types

  • Class types, such as Form

  • Delegates

Holds Actual Data: Yes No
Pointer to another memory location: No Yes
Example: Char, Integer Class, Object, String
Memory Allocation: On stack or in-line in structure On heap