Zebra0.com

csharp arraysArrays, Lists, and Collections in C#

Arrays, Lists, and Collections in C#

Learn C# (C sharp) in FREE step-by-step lessons.

Module 09: Arrays, Lists, and Collections in C#

Learn how to use arrays, list, and collection

Goals:

Objectives:

Please study the material at each of the links below.

  1. Variables as index of Arrays: Finds the total of all values in an array using a loop
  2. Introduction to Arrays Introduction to Arrays: An array is like a list. This shows how to declare and change values in an array
  3. Out of bounds: An exception: If we try to access an element beyond the last element there is a run time error.
  4. Use timer to cycle through colors in an array 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.
  5. 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.
  6. Colors: Change the color to selected color in combo box: Uses parallel arrays: a string with color names and Color objects
  7. Wishes Wishes: At timer event lables are given random font, color and text from arrays.
  8. Comparison of arrays and lists Comparison of arrays and lists: Examples of declaring arrays vs. lists
  9. Advice: An application with a List and Timer Advice: An application with a List and Timer: A list of good advice is randomly selected and scrolls across the form.
  10. Season: A special type of search Season: A special type of search: An array of first day of season is searched to find where the selected date belongs.
GlossaryGlossary for arrays lesson
Full Glossary