O'Reilly logo

C# 5.0 Unleashed by Bart De Smet

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

Method Groups

Closely related to method overloads are method groups, which are typically used with delegates, as you will see later in Chapter 17, “Delegates.” Basically, a method group is a set of overloaded methods that’s classified as an expression and is created by using a member lookup operation. For example, the following are method groups:

Console.WriteLinename.Substring

In a nutshell, delegates are a means to refer to a method such that it can be passed along as an object. For example, one piece of code might need “a method that will be able to take an object and return a Boolean to indicate whether it passes a condition.” To express this, it can take in a delegate that basically captures the signature of such a helper method it needs ...

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