O'Reilly logo

Beginning C# 2008: From Novice to Professional by Christian Gross

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 4. Learning About Data Structures, Decisions, and Loops

When you are creating applications, the source code will need to make decisions, such as: Should you open the file or save the file? And if you open the file, what kind of iterative code is going to read the contents of the file? These sorts of questions are answered by employing data structures, decisions, and loops.

The easiest way to demonstrate how to make a decision is to write a miniature artificial intelligence (AI) system. The AI system will be extremely primitive, but AI is interesting because it makes extensive use of decision and loop constructs. The AI system iterates and makes decisions based on data defined in a neat and orderly custom data structure.

Using the example ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required