| Home | Contact us |
|
|
|
|
|
Explain some features of interface in C#.
Comparison of interface with class (interface vs class):
-
An interface cannot inherit from a class.
-
An interface can inherit from multiple interfaces.
-
A class can inherit from multiple interfaces, but only one class.
-
Interface members must be methods, properties, events, or indexers.
-
All interface members must have public access (the default).
-
By convention, an interface name should begin with an uppercase I.
Category: OOPS Faqs Concepts Faqs, Interview Questions & Answers in C#
|
|
|
|
|
|
|