O'Reilly logo

Computing with C# and the .NET Framework, 2nd Edition by Gittleman

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

7Arrays

7.1 Using Arrays

7.2 Creating, Inputting, and Copying an Array

7.3 Arrays of Objects and a Simulation

7.4 Multidimensional Arrays

7.5 (Optional) Solving Problems with C#: Insertion Sort

Each variable of one of the primitive types holds a single value. Using an integer variable score to hold a single test score, we can write a program to add a list of test scores. Once we add a score to the total we no longer need that value, and could read the next test score and save it in the same variable, score.

Suppose, however, that we want to arrange the scores from highest to lowest, displaying an ordered list of all scores. To sort the scores, we need to have them all available so we can compare one score with another. Using variables of type ...

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