Figure 9-1.
Interfaces, like classes, can be defined in any *.cs
file.
At a syntactic level, an interface is defined using the C# interface keyword. Unlike other .NET
types, interfaces never specify a base class (not even System.Object) and their members never spec-
ify an access modifier (as all interface members are implicitly public and abstract). To get the ball
rolling, here is a custom interface defined in C#:
Do'stlaringiz bilan baham: