Organize data with arrays and lists in C#

Beginner
Developer
Higher Education Educator
K-12 Educator
Student
.NET

Learn how to store and manage groups of related data in C# using arrays and List<T>, and choose the right structure for the job.

Learning objectives

After you complete this module, you'll be able to:

  • Store and access a fixed-size sequence of items using an array

  • Store and manage a resizable sequence of items using a List<T>

  • Choose between an array and a List<T> for the data you're working with

Prerequisites

  • Beginner level experience with basic C# syntax rules

  • Beginner level experience with creating literal values and declaring variables of basic data types like string, int, and decimal

  • Beginner level experience with evaluating Boolean expressions and using if, else if, and else statements

  • Beginner level experience with repeating actions using for, while, and do-while loops