I think the article on this website is a good example. http://www.codeproject.com/KB/recipes/PolymorphismC.aspx