O'Reilly logo

Visual Basic® .NET by Example by Bob Donald, Gabriel Oancea

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required