Skip to content
This repository has been archived by the owner on Aug 31, 2021. It is now read-only.

Latest commit

 

History

History
23 lines (16 loc) · 830 Bytes

File metadata and controls

23 lines (16 loc) · 830 Bytes

Learning objectives

  • Know what explicit and implicit casts are.
  • Know how to do an explicit cast.
  • Know how to use is and as to cast types.
  • Know how to use the typeof operator.
  • Pattern matching on types.

Out of scope

  • Custom explicit and implicit cast operators.
  • Memory and performance characteristics.

Concepts

  • casting: know what explicit and implicit casts are; know how to do an explicit cast; know how to use is and as to convert between types.
  • implicit-casting: know about implicit type conversion

Prerequisites

  • numbers: know how to cast numbers and what explicit and implicit numeric casts are.
  • inheritance: work with inheritance to show when casting can be reasonably used.
  • exceptions: know about exceptions to understand what happens when an explicit cast fails.