C# Tutorials - Herong's Tutorial Examples - Version 3.30, by Dr. Herong Yang
Creating and Using Arrays
This section describes arrays. An array is a data structure that can be used to store multiple values of the same type.
An array is a simple data structure with the following features:
The following is a list of commonly used terms related to the an array:
There are several syntaxes involved to define an array, create an array, assign an array, and represent an array elelement:
array_declaration_statement: type array_name; array_creation_expression: new type[length] array_assignment_statement: array_name = new type[length] array_element expression: array_name[index]
The array declaration statement defines the name of the array, and the type of the data value the array can store. Once an array name is defined, it is ready to be assigned with an array of the same type.
The array creation expression creates an array of the specified type and length.
The array assignment statement assigns an array to an array name of the same type.
The array element expression represents an array element, which can be used in the same way as a variable of array's type.
Last update: 2010.
Table of Contents