Home > Articles > Programming > Windows Programming

  • Print
  • + Share This
This chapter is from the book

4.7 Struct Design

The general-purpose value type is most often referred to as a struct, its C# keyword. This section provides some guidelines for general struct design. Section 4.8 presents guidelines for the design of a special case of value type, the enum.

In general, structs can be very useful, but should only be used for small, single, immutable values that will not be boxed frequently. Next are guidelines for enum design, a more complex matter.

  • + Share This
  • 🔖 Save To Your Account