ENع
الدرس 03 · Basics

Value types and reference types

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

Every C# type is a value type or a reference type, and the difference shows up the moment you assign one variable to another. Follow an eight-line program through memory: copying an int copies the value, so the two variables stay independent; copying a reference to a Box object copies only the arrow, so two variables share one object and a change made through one is seen through the other. The program prints 5 9 9.

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

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