SUMMARY

Subroutines and functions let you break an application into manageable, reusable pieces. A subroutine performs a series of commands. A function performs a series of commands and returns a value.

Property procedures use paired functions and subroutines to provide the appearance of a simple property.

These form the fundamental building blocks of the procedural part of an application. Chapters 22 through 26 explain the other half of an application’s structure: the objects that encapsulate the application’s behavior. Together, the program’s objects and its procedural subroutines and functions define the application.

This chapter explained how to break an otherwise unwieldy expanse of code into subroutines and functions of manageable size. It also explained techniques related to subroutines and functions, such as extension methods and relaxed delegates, that let you use existing classes and events in new ways.

This chapter also explained three ways you can execute pieces of code simultaneously on different threads of execution. If your computer has multiple cores or CPUs, that may allow you to greatly improve performance.

The chapters so far have not explained how to write anything other than straight-line code that executes one statement after another with no deviation. Most programs need to follow more complex paths of execution, performing some statements only under certain conditions and repeating others many times. Chapter 17, “Program Control Statements,” describes the statements that a Visual Basic program uses to control the flow of code execution. These include decision statements (If Then Else, Select Case, IIF, Choose) and looping statements (For Next, For Each, Do While, While Do, Repeat Until).

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.27.58