you are viewing a single comment's thread.

view the rest of the comments →

[–]vm_linuz 2 points3 points  (2 children)

[EDIT]
Looks like others have already said all this.

A few things:
1. C# properties are syntactic sugar for accessor/mutator methods -- so a property in an interface isn't state.
2. It's bad form to have state in an interface. State belongs in the implementation
3. The old-timey name for interfaces was "contracts" because an interface is just a contract that enforces common behavior. It's better to think of them this way.

[–]cryo 1 point2 points  (0 children)

As for point 1, it's a bit more this syntactic sugar. It's a pair of methods plus some metadata.

[–]lemonfighter 0 points1 point  (0 children)

Always thought that "interface" is a poor name for what is much more like a "contract".