Junior OOP

What is encapsulation?

  • The practice of hiding internal details of a class and exposing only necessary

functionality through access modifiers and properties.

private int speed;

public int Speed

get { return speed; }

set { speed = value; }

More from C# Programming Tutorial

All questions for this course