Skip to content

Method Invocations in C#

You can call other methods from inside a method body.
• The phrases call a method and invoke a method are synonymous.
• You call a method by using its name, along with the parameter list, which we’ll
discuss shortly.
For example, the following class declares a method called PrintDateAndTime, which is called from
inside method Main:

Below figure illustrates the sequence of actions when a method is called.
1.  Execution of the current method suspends at that point of the invocation.
2. Control transfers to the beginning of the invoked method.
3. The invoked method executes until it completes.
4. Control returns to the calling method.

Leave a Reply

Your email address will not be published. Required fields are marked *