Let’s look at a summary of the concepts covered in this chapter.

We'll cover the following

Chapter summary

Let’s summarize this chapter:

  • Classes and structs share common features but have big differences.

  • Classes are reference types. The new keyword constructs an anonymous class object and returns a class variable.

  • Class variables that are not associated with any object are null. Checking against null must be done by is or !is, not by == or !=.

  • The act of copying associates an additional variable with an object. In order to copy class objects, the type must have a special function likely named dup().

  • Assignment associates a variable with an object. This behavior cannot be changed.

Get hands-on with 1000+ tech skills courses.