Sample project containing code discussed on my blog - invariantproperties.com.