A good question! Here's what I would do:
1. Get a birth date. Have the user enter a date in a TextBox and click a Go button.
2. Parse the date to create a Date variable. Use its Year, Month, and Day properties to get its year month and day.
3. Clear the ListBox. Then for (int i = 0; i <= 10; i++):
a. Create a new Date variable using the Year + i, Month, and Day.
b. Display the new Date and its DayOfWeek.ToString() in the ListBox.
I think you can do everything here except the loop with what you know by Lesson 15. Loops are covered in Lesson 19. (I suppose you could do this with a series of 11 nearly identical statements instead of using a loop but it would be poor code.)
Give that a try and let me know if you get stuck. If you want to see an example, email me and I'll send one to you.
|