Sample code from Mobile Development in C#