Introduction

Completed

Most programs need to work with data. Sometimes that data is hard-coded (like a greeting message), and sometimes it comes from users or other sources. In this unit, you learn about literals (hard-coded values) and variables for storing data. By the end, you'll know how to work with different data types and use them in your programs.

Learning objectives

In this module, you will:

  • Create literal values for common data types (string, int, decimal, bool, char)
  • Declare and initialize variables
  • Assign and retrieve values in variables
  • Use the var keyword for implicit typing

Note

We recognize that different people like to learn in different ways. You can choose to complete this module in video-based format or you can read the content as text and images. The text contains greater detail than the videos, so in some cases you might want to refer to it as supplemental material to the video presentation.