Essential C# Structs  Suggest an edit



Unlike classes, a struct is a value type, and is created on the local stack and not on the managed heap, by default. This means that once the specific stack goes out of scope, the struct is de-allocated. Contained reference types of de-allocated structs are also swept, once the GC determines they are not longer referenced to by the struct.

structs cannot inherit and cannot be bases for inheritance, they are implicitly sealed, and also cannot include protected members. However, a struct can implement an interface, as classes do.

Table Of Contents
22 Enum
93 Structs
107 Stream
108 Timers
  ↑ ↓ to navigate     ↵ to select     Esc to close