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

Events

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

An event lets an object announce that something happened, without knowing who is listening. Follow an Oven that declares public event Action? Done: two handler methods subscribe with +=, Bake raises the event with Done?.Invoke() and every handler runs in order, one handler leaves with -=, and the compiler stops outside code from raising the event itself. The program prints Beep!, Flash!, Flash!.

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

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