Chapter 4: Classes

Learning Objectives

After completing this chapter, you should be able to do the following:

  1. Use access modifiers to customize fields and methods.
  2. Override built-in methods such as ToString and Equals.
  3. Understand equality and sameness in C#.

Key Terminology

Throughout this lesson you should make note of the following terms and their definitions as you read the content on the page:

Classes for C#

  1. class
  2. object
  3. fields
  4. methods
  5. members
  6. instance
  7. this keyword
  8. shadowing

Modifiers in C#

  1. access level
  2. access modifier
  3. public
  4. private
  5. default access
  6. assembly
  7. world-level

Encapsulation

  1. encapsulation
  2. accessor
  3. getter
  4. setter
  5. auto-implemented property
  6. backing field

Constructors

  1. default constructor

Methods

  1. instance method