Sunday, 21 October 2012

VB.NET What are: Structures


Structures can be defined as a tool for handling a group of logically related data items. They are user-defined and provide a method for packing together data of different types. Structures are very similar to Classes. Like Classes, they too can contain members such as fields and methods. The main difference between classes and structures is, classes are reference types and structures are value types. In practical terms, structures are used for smaller lightweight objects that do not persist for long and classes are used for larger objects that are expected to exist in memory for long periods. We declare a structure in Visual Basic .NET with the Structure keyword.  
There are storage and performance advantages with Structures, often they are negligible.


Preffered by me.

Sources for this article:
and also we have nice article in code project

No comments:

Post a Comment