- Classes are blueprints for objects in C#. Objects are instances of classes. Classes contain data fields, methods, and other members.
- There are different access modifiers like public, private, and protected that control access to class members. Constructors initialize new objects, and destructors perform cleanup when objects are destroyed.
- Inheritance allows classes to inherit members from base classes. Polymorphism allows classes to share common interfaces while providing different implementations. Interfaces define contracts without implementation, while abstract classes can contain partial implementations.
- Encapsulation hides implementation details within a class. Abstraction exposes only necessary details to users through public interfaces. Extension methods can add methods to existing types without creating new derived types.
Related topics: