Mixins are a powerful concept for object-oriented class composition. re-mix provides mixins for C# and Visual Basic .NET.

While C# and VB.NET are continuously improving, they still support only a single mechanism for class composition: single inheritance. Over the years, many other mechanisms have been tried, among them multiple inheritance, mixins and traits. These mechanisms allow for a more flexible composition of classes from various sources, therefore enabling new programming techniques that reduce code redundancy, increase the expressiveness of code and allow for a more direct mapping of mental models to code.

Some of the features of re-mix are:
  • Create mixins that add interfaces with implementations and state to other classes
  • Override class methods in mixins
  • Implement abstract mixin methods in classes that use mixins
  • Apply any number of mixins to any class
  • Apply mixins statically via attributes, or dynamically via code
  • Apply mixins on application startup without starting any tools, or at build-time as you prefer
  • Add and remove attributes via mixins
  • Mixins can derive from each other, and mixins can even be applied to mixins

What's the diffrence between mixins and extension methods?

Additional information about mixins and re-mix:
If you have questions regarding re-mix, contact the development team via our Google Groups page. Please follow this project to stay informed about updates!

Last edited Wed at 6:27 AM by FabianSchmied, version 13