PART I
C h a p t e r 1 5 :
D e l e g a t e s , E v e n t s , a n d L a m b d a E x p r e s s i o n s
409
PART IPART I
of the anonymous method and is now the preferred approach to creating an anonymous
function. However, anonymous methods are widely used in existing C# code. Therefore,
they are still an important part of C#. Furthermore, anonymous methods are the precursor
to lambda expressions and a clear understanding of anonymous methods makes it easier to
understand aspects of the lambda expression. Also, there is a narrow set of cases in which
an anonymous method can be used, but a lambda expression cannot. Therefore, both
anonymous methods and lambda expressions are described in this chapter.
Do'stlaringiz bilan baham: |