C# 6 and .NET Core 1.0:Modern Cross:Platform Development
上QQ阅读APP看书,第一时间看更新

Chapter 6. Building Your Own Types with Object-Oriented Programming

This chapter is about making your own types using object-oriented programming (OOP). You will learn about all the different categories of members that a type can have, including fields to store data and methods to perform actions. You will use OOP concepts such as aggregation and encapsulation.

This chapter will cover the following topics:

  • Talking about OOP
  • Building class libraries
  • Storing data with fields
  • Writing and calling methods
  • Controlling access with properties and indexers
  • Simplifying methods with operators
  • Raising and handling events