Using Structs (C#)
Full Name:
Using Structs (C#)
Short Name:
Using Structs (C#)
Type of Entity:
C#
Abstract:
The struct type is suitable for representing lightweight objects such as Point, Rectangle, and Color. Although it is possible to represent a point as a class, a struct is more efficient in some scenarios. For example, if you declare an array of 1000 Point objects, you will allocate additional memory for referencing each object; in this case, a struct would be less expensive. Since the .NET Framework contains an object called Point, we'll call our struct "CoOrds" instead.
MSDN Source URL:
http://msdn2.microsoft.com/0taef578.aspx