Objective 2.3: Enforce encapsulation

Encapsulation is one of the pillars of object-oriented development. Hiding the private elements from other objects inside an object-oriented system makes better software. When you want something done, ask another object to perform this action. The only thing you have to know is the external interface. The implementation is hidden from you, and you don’t have to understand how it works as long as it complies with the interface. C# helps with encapsulating the inner workings of an object by providing properties, access modifiers, and interfaces.

Using access modifiers

One of the key concepts of encapsulation is ...

Get Exam Ref 70-483: Programming in C# now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.