Mar 30, 2009

C# Notes: Value Types

3 General Value Types:
  1. Struct / User-defined Types
  2. Enum Types
  3. Simple / Built-in Types

Notes on Value Types:

  • contains the actual data instead of just a reference to the data.
  • stored in the stack memory
  • an operation to a copy of a variable doesn't affect the other copies
  • derived implicitly from System.ValueType
  • has an implicit default constructor that initialises the default value
  • may contain a NULL value

No comments:

Post a Comment