ENع
الدرس 07 · Objects

Properties

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

A property looks like a field from outside, but it is a pair of methods called accessors: get runs on every read and set runs on every write. Follow a Thermostat object whose set uses Math.Clamp to keep its private field between 5 and 30, so writing 99 stores 30; then meet a computed, read-only property (86) and an auto-implemented one.

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

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