Chapter 3. Writing Methods and Applying Scope

After completing this chapter, you will be able to:

  • Declare and call methods.

  • Pass information to a method.

  • Return information from a method.

  • Define local and class scope.

  • Use the integrated debugger to step in and out of methods as they run.

In Chapter 2, you learned how to declare variables, how to create expressions using operators, and how precedence and associativity control expressions containing multiple operators. In this chapter, you’ll learn about methods. You’ll also learn how to use arguments and parameters to pass information to a method and how to return information from a method by using return statements. Finally, you’ll see how to step in and out of methods by using the Microsoft Visual ...

Get Microsoft® Visual C#® 2005 Step by Step 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.