ENع
الدرس 15 · Working with data

Delegates and lambdas

لم يُترجم بعد؛ يُعرض باللغة الإنجليزية

A delegate is a type whose values are methods, and a lambda is a method written in place with no name. Follow seven lines of C#: the lambda x => x > limit becomes a delegate object on the heap, LINQ's Count calls it once per element and prints 2, and after limit changes the same delegate answers 3, because a lambda captures variables, not copies of their values.

14 دقيقة11 خطوات5 أسئلةIntermediate
شكل 15 · تفاعلي
جارٍ تحميل الرسم…
أو ← →

اختبار يتاح بعد الخطوة الأخيرة.