Description of what the interface does?

As for OOP, how would you describe the interface?

I mean, a subclassification can be described as "Has-A," and inheritance can be "Is-A." The member method may be "Can-Do."

Is there a way to extend this (no pun intended) to describe what the interface does?

+3
source share
5 answers

I consider objects as nouns , methods as verbs and interfaces as adjectives (of course, this analogy is simplified, but often works enough).

: Serializable , , , , . : " ". : " ", : " ".

Federico answer, "CAN-DO".

, . , .

, , , . , , , .

, , . . .

, .

, , - HAS-A. , , , IS-A. HAS-A .

  • - , . . : . , .

  • , , . . : , .

+7

.

, Has-A/Is-A, , .

, , .

+2

--.

+1

, "Can-Do". - , " , , ".

+1

Joel, which does not mean that it is an interface. It is like an abstract base class, but it does not implement methods and properties.

This pretty much sums up what an interface is.

http://www.c-sharpcorner.com/UploadFile/rmcochran/csharp_interrfaces03052006095933AM/csharp_interrfaces.aspx?ArticleID=cd6a6952-530a-4250-a6d7-54717ef3b345

0
source

All Articles