You are here:About>Computing & Technology>Visual Basic> Learn VB.NET> Using Decision Structures - Part 1
About.comVisual Basic
Newsletters & RSSEmail to a friendSubmit to Digg

Chapter 6 - Using Decision Structures - Part 1

From Dan Mabbutt,
Your Guide to Visual Basic.
FREE Newsletter. Sign Up Now!

A Decision Structure is the code that makes a program do different things

Decisions
Previous | Next >>

Computers are sometimes called, "Thinking Machines" (in fact, a supercomputer company by that name was in business once). But the main thing that has to happen when a computer is "thinking" is decisions. And making decisions with a computer is what this chapter is all about.

When people accuse computers of acting really stupid, it's really not the computer. It's incorrect programming. A programmer wrote a program that told the the computer to make a stupid decision. Computers always, always do what you tell them to do. If you program a bad decision, the computer makes a bad decision. A really good understanding of this chapter will prevent that from happening!

In this lesson, we're going to add some new details and information to the information about decison making in the book. For example, a decision structure using If statements will be explained early in the chapter. To make sure you understand how the various programming choices you have relate to each other, we'll code the same thing as a Select Case structure. We'll also add more information about the decision statements themselves, including one that the book left out. And we'll extend the event handling example at the end and tie it into the previous chapter where the VB.NET Region was introduced.

  1. A Decision Structure is the code that makes a program do different things
  2. Organization of the Lesson
  3. Beyond the Book: Modifying the Event Handler
  4. Responding to Events in Code
  5. Decision Structure Syntax - How to read Microsoft documentation
  6. Entering the If-Then-Else Code

Previous | Next >>

 All Topics | Email Article | | |
Advertising Info | News & Events | Work at About | SiteMap | Reprints | HelpOur Story | Be a Guide
User Agreement | Ethics Policy | Patent Info. | Privacy Policy©2008 About, Inc., A part of The New York Times Company. All rights reserved.