Structure Declaration

A structure is a complex data type that consists of one or more members (also known as fields). Let's look at an example so that you understand better. Assume that you are dealing with a graphics application that requires you to access (get and set) the color of a point (known as pixel) anywhere on the display, as well as other graphic operations that require the pixel coordinates. You can represent the address of any point on the screen as a pair of x and y coordinates. That means that any time you need to operate on a given point you need to specify both the x and the y coordinate. It would be useful to be able to treat each pixel as a unit, rather than dealing with independent x-y numbers. That is where the structures ...

Get Visual Basic® .NET by Example now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.