tags:

views:

74

answers:

2
+2  Q: 

Mixins and .net

What are, exactly mixins?
Are there any techniques to achieve that in c#?

+3  A: 
0A0D
+3  A: 

A mixin is a set of class members that can be "mixed" into a class without the problems of multi-inheritance.

C# doesn't have mixins per-se, but offers Extension Methods for similar goals.

dtb
Although is not quite a mixin. Would have a easy to see example in any pseudo or real language?
NoProblemBabe
@NoProblemBabe: For example, Ruby provides the `Enumerable` mixin which can be mixed into classes that are enumerable to extend the class with methods for filtering, mapping and sorting. C#/.NET has the static `Enumerable` class which provides Extension Methods for filtering, mapping and sorting classes that are enumerable ("LINQ").
dtb