Current .Net Version: 2.0.50727
Home
Articles
C# & .Net Framework Reference
Practice C# Online
XML Web Services
RSS Feeds
Code Snippets
T-SQL Scripts
Videos
Valuable Links
Contact Us
Mike's C#, VS.NET and SQL Blog




ROR XML Info.
C# & .Net Framework Reference
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

 
COPYRIGHT/DISCLAIMER | CONTACT US