ENع
الدرس 08 · Objects

Structs and records

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

A struct is a value type: its variable holds the data itself, so assigning it copies every field. A record is a type the compiler fills in for you: from one line it writes a constructor, init-only properties, value equality, a readable ToString and support for with. Follow one program as a struct is copied and changed, and as record objects land on the heap, get copied with with, print themselves and compare equal by value.

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

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