6. Methods

Form ever follows function.

—Louis Henri Sullivan

O! call back yesterday, bid time return.

—William Shakespeare

Answer me in one word.

—William Shakespeare

Objectives

In this chapter you’ll:

• Construct programs modularly from methods.

• Create new methods.

• Pass information between methods.

• Learn simulation techniques that employ random-number generation.

• Understand how the visibility of identifiers is limited to specific regions of programs.

• Use method overloading and Optional parameters.

• Use debugger commands for entering and exiting methods and for continuing program execution.

Get Visual Basic® 2012 How to Program, Sixth Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.