AllTheTimeWorld.com
Arrays in C#
Privacy
Contact
Topics
Algorithms
Alice 3
C++
C# Windows
RGB Colors
Computer Basics
Computer Concepts
Faculty resources
HTML5
Java
Systems Analysis and Design
Visual Basic
Arrays in C#
Learn C# (C sharp) in FREE step-by-step lessons.
Arrays in C#
Understand Arrays, Lists, and Collections in C#
In order to do this you will:
Be able to declare and use an array in C#;
Use a variable as index to array;
Be able to handle out of bounds exceptions;
Cycle through values of an array;
Work with arrays in conjunction with other controls;
Differentiate between arrays and lists.
Please study the material at each of the links below.
Microsoft Reference: C# Arrays
:
Read these white papers from Microsoft
Microsoft Reference: C# Collections
:
Read these white papers from Microsoft
Introduction to Arrays
:
An array is like a list. This shows how to declare and change values in an array
/csharp/videos/csharp-array.php
Variables as index of Arrays
:
Finds the total of all values in an array using a loop
Out of bounds: An exception
:
If we try to access an element beyond the last element there is a run time error.
Use timer to cycle through colors in an array
:
Global parallel arrays are used for the color names and colors.
Make sure the subscript is not out of bounds.
/csharp/videos/csharp-colorArray.mp4
Colors: Add an array of strings to combo box
:
A global array of color names is created.
In form load, a loop, adds the colors to combo box.
Colors: Change the color to selected color in combo box
:
Uses parallel arrays: a string with color names and Color objects
Wishes
:
At timer event lables are given random font, color and text from arrays.
/csharp/videos/csharp-object-array.mp4
Comparison of arrays and lists
:
Examples of declaring arrays vs. lists
/csharp/videos/array-list.mp4
Advice: An application with a List and Timer
:
A list of good advice is randomly selected and scrolls across the form.
/csharp/videos/csharp-advice.mp4
Season: A special type of search
:
An array of first day of season is searched
to find where the selected date belongs.
/csharp/videos/csharp-seasons.mp4