Lesson 3.5 Methods and functions calling
Now you know all about methods and functions and their differences. I do bang on about power vs ease of use a lot. C# has way more power to give. It also means that there are new tricks to learn and a few concepts to get your head around.
I will eventually cover ref, out and params parameters. However that will require me to go over the differences between reference and value type variables. If you feel the need to scare yourself go and Google these terms. For now let's go over a couple of things you can do using what you already know.
The first and most important thing to remember about these methods and functions is that you can call them from each other. That is to say, you can call a method from another method. That method can then call a function which could call another method again which could even call a method that has already been called and then call itself again. Are you with me? What I'm saying is that C# let's functions and methods call each other alot.
It's the at the root of the concept called reusability. You encase pieces of useful operations in a method and you then call them from wherever. The alternative would be to copy and paste it everywhere. If you needed to alter that code six months down the line the headaches would be enormous. Also - your workmates would beat you with UNIX manuals in the car park. So creating handy methods means that you don't get a bruising that would be embarassing to describe the source of in the pub.