Skip to content
This repository has been archived by the owner on Aug 31, 2021. It is now read-only.

Latest commit

 

History

History
33 lines (22 loc) · 1.23 KB

methods.md

File metadata and controls

33 lines (22 loc) · 1.23 KB

Methods

The Concept

A method is a function that is part of a class.

What to cover

  • How to define a method How to define a method. How to add functionality to a method. How does scoping the method work?
  • How to use method parameters How to define method parameters and how to use them.
  • How to return a value from a method How to return a value from a method. Does it require a specific keyword?
  • How to invoke a method How to invoke a method and pass arguments to it.

Exercises

Lasagna cooking

This exercise deals with cooking a lasagna dish in the oven. The reference implementation (C#) teaches:

  • How to define a method with zero, one and two parameters.
  • How to use parameters in a method.
  • How to return a value from a method.
  • How to call a method.

Implementations

Track Exercise Changes
C# lucians-luscious-lasagna None