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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.