It should have been easy to find on the Internet.
Interfaces are contracts that must be executed by implementing classes. Therefore, they can consist of public methods, properties, and events (indexes are also allowed).
The variables in the interfaces are NO. Can you talk about why they are needed? You can have variables in base classes. Properties in the interfaces. Yes, since they are paired methods under the hood.
Interface members are implicitly public. You cannot explicitly specify access modifiers
public interface ISampleInterface {
see also
Gishu
source share