- Value types are also objects
- These include Built-in types, structures and enums
- Better use Int32 for interger operations and Double for floating point
- Booleans are 4-byte value types (I thought they used 1-bit)
- There are nearly 300 value types in .NET
- Value type vvariables can be declared Nullable ( C# shortcut ?, as in float? amount; )
- Structures are referred to as User-Defined Types.
- Value types are stored over Stack in memory
- Reference types are stored over a Managed Heap in memory.
- Usually, create structures when requiring instances of size less that 16 bytes that require no inheritance, ploymorphism, etc.
- The default base-type for enum is int
- To create enum with another base type we can use enum Days : byte { ... }
- Enum base type cannot be char
Monday, June 1, 2009
Chapter 1-Lesson 1
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment