6.Lesson 5: Methods
In previous lessons of this tutorial, all of our functionality for each program resided in the Main() method. While this was adequate for the simple programs we used to learn earlier concepts, there is a better way to organize your program, using methods. A method helps you separate your code into modules that perform a given task. The objectives of this lesson are as follows:
- Understand the structure of a method.
- Know the difference between static and instance methods.
- Learn to instantiate objects.
- Learn how to call methods of an instantiated object.
- Understand the 4 types of parameters.
- Learn how to use the this reference.