Sunday, February 12, 2012

Chapter 5 wrap up

Chapter 5 was a lot easier to digest than chapter 4. The one thing that I will have to get used to is declaring private variables in the form instead of local variables in the buttons. The assignments this time around were about half the code that the workshop selector was. So far having lots of fun with using Visual Studio. Also learned a new way to create a pop up box, its useful for the Random Number Guessing program.

else if (yourNumber == randomNumber)
                    {
                        if (MessageBox.Show("Congratulations, You won. Would you like to play again?", "You win!", MessageBoxButtons.YesNo) == DialogResult.Yes)
                        {
                            // enter your code to restart the random event again here
                        }
                        else
                        {
                            this.Close();
                        }
                    }

1 comment:

  1. For me, chapter five is a lot harder than chapter four for some reason. I'm still working on the projects! Hopefully I figure them out by midnight.

    ReplyDelete