Lists, Dictionaries, and Queues

Learn about working with lists, dictionaries, queues, and priority queues using common methods and syntax.

Working with lists

Let’s explore lists in C#:

Step 1: Use your preferred code editor to add a new Console App or console project named WorkingWithCollections to the Chapter08 solution or workspace:

  • In Visual Studio Code, select WorkingWithCollections as the active OmniSharp project.

Step 2: Add a new class file named Program.Helpers.cs.

Step 3: In Program.Helpers.cs, define a partial Program class with a method to output a collection of string values with a title, as shown in the following code:

Get hands-on with 1400+ tech skills courses.