Introduction

Completed

Suppose you are a software developer on a team assigned to work with a logistics company. They have many needs for gathering and organizing their business data. Projects vary from tracking and reporting inventory, enabling specific data to be passed to and from business partners, and identifying possible fraudulent orders. Each project is different, but all require the processing of data. In these projects the applications will be performing data operations such as to add, delete, sort, combine, calculate, validate and format output.

In this module, you'll use C# arrays to allow you to store sequences of values in a single data structure. Once you have data in an array, you can manipulate the order and the contents of the array. Furthermore, you'll be able to perform powerful string operations using array helper methods.

With the use of several helper methods, you'll sort the data or reverse the order of the data. You'll clear out the items in the array and resize the array to add new items. You'll convert a string into an array by splitting it into smaller strings each time you encounter a character like a comma. You'll also split a string into an array of characters. Finally, you'll join all of the 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