O'Reilly logo

Visual C#® 2012: How to Program, Fifth Edition by Harvey Deitel, Paul Deitel

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

7. Methods: A Deeper Look

E pluribus unum. (One composed of many.)

—Virgil

O! call back yesterday, bid time return.

—William Shakespeare

Call me Ishmael.

—Herman Melville

Answer me in one word.

—William Shakespeare

There is a point at which methods devour themselves.

—Frantz Fanon

Objectives

In this chapter you’ll:

• Learn how static methods and variables are associated with classes rather than objects.

• Learn how the method call/ return mechanism is supported by the method-call stack.

• Use random-number generation to implement game-playing apps.

• Learn how the visibility of declarations is limited to specific parts of apps.

• Create overloaded methods.

• Use optional and named parameters.

• Use recursive methods.

• Pass method arguments ...

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