Beginning C# 7 Hands-On:Advanced Language Features
上QQ阅读APP看书,第一时间看更新

Making objects of the delegate type

Now, the next thing that we will do is to enter the following below the preceding line:

Compare comp = (a, b) => (a == b);

As you begin to enter Compare, notice from the popup that once you have a delegate (Compare), essentially, you can make objects of that kind; then, type comp.