O'Reilly logo

Start Here!™ Fundamentals of Microsoft® .NET Programming by Rod Stephens

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

Program-Defined Data Types

In addition to using the “simple” data types described earlier in this chapter, such as Integer, Decimal, and Boolean, a program can define new data types. The most common kinds of data types that a program can define are arrays, enumerations, structures, and classes.

Arrays

An array is a series of values with the same data type stored in a single chunk of memory. When a variable is an array, its name refers to the array as a whole, and an integer called index in the array lets the program select a particular value inside it.

As an analogy, you can think of an array as similar to the mailboxes in an apartment building. The building has a street address (the array’s name) that all the mailboxes share. Each mailbox has a ...

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