C# Properties

Properties and Encapsulation

Before we start to explain properties, you should have a basic understanding of “Encapsulation“.

The meaning of Encapsulation, is to make sure that “sensitive” data is hidden from users. To achieve this, you must:

  • declare fields/variables as private
  • provide public get and set methods, through properties, to access and update the value of a private field

Continue reading C# Properties