CHAPTER 16

Handling binary data and using indexers

After completing this chapter, you will be able to:

  • Store and display integer data using binary and hexadecimal representations.

  • Perform bitwise operations in binary data.

  • Encapsulate logical array-like access to an object by using indexers.

  • Control read access to indexers by declaring get accessors.

  • Control write access to indexers by declaring set accessors.

  • Create interfaces that declare indexers.

  • Implement indexers in structures and classes that inherit from interfaces.

Chapter 15, “Implementing properties to access fields,” describes how to implement and use properties as a means of providing controlled access to the fields in a class. Properties are useful for mirroring fields that contain ...

Get Microsoft Visual C# Step by Step, Ninth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.