O'Reilly logo

C# Primer Plus by Klaus Michelsen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Pending Method Instances of the Same Method

While MethodC was being executed in the program of Listing 23.1, each of the methods Main, MethodA, and MethodB had exactly one associated pending method instance. It also is possible for one single method to have many associated pending method instances in C#. This ability is one of the fundamental requirements for writing recursive methods in a particular computer language. To demonstrate this ability, let's look at Listing 23.2 that generates four pending method instances similar to those in Listing 23.1, but this time the pending method instances (apart from Main) are all of the same method. It is our aim with the single method in Listing 23.2 to get as close as possible to the functionality of ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required