Introduction

Completed

Suppose you're a software developer on a team working with a logistics company. Your task is to gather and organize their business data. You're involved in various projects, each unique but all centered around data processing. These projects include tracking and reporting inventory, exchanging data with business partners, and identifying potential fraudulent orders. The common operations across these projects are adding, deleting, sorting, combining, calculating, validating data, and formatting output.

In this module, you work with C# arrays to store sequences of values in a single data structure. Once you store data in an array, you can modify both the order and contents. Additionally, you can perform complex string operations using array helper methods.

You start by using helper methods to sort or reverse the data. Next, you learn how to remove items from the array and resize the array to accommodate new items. Then, you learn to convert a string into an array by splitting it into smaller strings each time a specific character, such as a comma, is encountered. The same method can also be used to split a string into an array of characters. Finally, you learn how to join all elements of an array into a single string.

Learning objectives

In this module you will:

  • Sort and reverse the order of array elements.
  • Clear and resize the elements of an array.
  • Split a string into an array of strings or characters (chars).
  • Join array elements into a string.

Prerequisites

  • Introductory level experience with arrays
  • Introductory level experience with the if statement
  • Introductory level experience with built-in methods on data types (like string)
  • Experience using Visual Studio Code to develop, build, and run C# code