Patterns example in .Net