Adam's sample code for learning C#