CTS Structure Types
The concept of a structure is also formalized under the CTS. If you have a C background, you should
be pleased to know that these user-defined types (UDTs) have survived in the world of .NET (although
they behave a bit differently under the hood). Simply put, a
structure can be thought of as a light-
weight class type having value-based semantics. For more details on the subtleties of structures, see
Chapter 4. Typically, structures are best suited for modeling geometric and mathematical data, and
are created in C# using the struct keyword:
Do'stlaringiz bilan baham: |