Skip to content
Sagi edited this page Apr 25, 2015 · 30 revisions

A mixin is an interface with implemented methods.
Mixins exists in .NET in the form of object oriented interfaces implementation.

Defined by Wikipedia:

In object-oriented programming languages, a mixin is a class which contains a combination of methods from other classes. How such a combination is done depends on the language, but it is not by inheritance. If a combination contains all methods of combined classes it is equivalent to multiple inheritance.

NCop allows the notion of multiple inheritance as opposed to .NET object oriented.
Mixins fits well with the concept of composition over inheritance.

NCop allows to construct there types of Mixins

NCop allows to use the MixinsAttribute in several different ways - Mixin annotations options