Introduction to Methods
Introduction to Methods: Introduction to Methods: an overview, Practice: The Need for Methods, Organizing Code into Methods, Practice: Creating Methods.
Updated
- Introduction to Methods: an overview (Novice): A method is a named block of reusable code; you've been calling them since your first program.
- Practice: The Need for Methods (Novice): Extend a program that prints college football scores by copying and pasting its code, and see the problems copying causes.
- Organizing Code into Methods (Apprentice): Write your own C# methods with parameters and return values, call them with arguments, and keep each one to a single job.
- Practice: Creating Methods (Apprentice): Replace the football program's copied blocks with one method that takes each team's scores as parameters.