The Strategy pattern is a behavioral design pattern that enables selecting an algorithm at runtime. This pattern defines a family of algorithms, encapsulates each one, and makes them interchangeable. Strategy lets the algorithm vary independently from the clients that use it.
Here's how to implement the Strategy pattern in C#:
main.cs51 chars5 lines
main.cs305 chars16 lines
main.cs218 chars15 lines
main.cs315 chars13 lines
gistlibby LogSnag