Identity operators

As classes are reference types, it is possible for multiple constants and variables to refer to the same single instance of class behind the scenes. To find out if two constants or variables refer to the same instance of a class exactly, Swift provides the following identity operators:

  • Identical to (===)
  • Not identical to (!==)
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset