When should we use interface and abstract class in C#?

1. If you are creating something that provides common functionality to unrelated classes, use an interface . 2. If you are creating something for objects that are closely related in a hierarchy, use an abstract class.

Sizin İçin Seçtik  Why do we use abstract class in Dart?

Leave a Reply

Your email address will not be published. Required fields are marked *