Summary


In this chapter, you have developed your programming knowledge by considering various structures that you can use in your code. The proper use of these structures is essential when you start making more complex applications, and you will see them time and again throughout this book.

First, you spent some time looking at Boolean logic, with a bit of bitwise logic thrown in for good measure. Looking back on this after working through the rest of the chapter confirms the initial assumption that this topic is very important when it comes to implementing branching and looping code in your programs. It is essential to become very familiar with the operators and techniques detailed in this section.

Branching enables you to conditionally execute code, which, when combined with looping, allows you to create convoluted structures in your C# code. When you have loops inside loops inside if structures inside loops, you start to see why code indentation is so useful! If you shift all your code to the left of the screen, it instantly becomes difficult to parse by eye, and even more difficult to debug. It is well worth making sure you've got the hang of indentation at this stage — you'll appreciate it later on! VS does a lot of this for you, but it's a good idea to indent code as you type it anyway.

In this chapter, you learned:

  • How to use Boolean logic

  • Techniques for structuring your code

In the next chapter, you look at variables in more depth.




Beginning Visual C# 2005
Beginning Visual C#supAND#174;/sup 2005
ISBN: B000N7ETVG
EAN: N/A
Year: 2005
Pages: 278

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net