ชนิดข้อมูลใน C# แบ่งออกเป็นสองประเภทพื้นฐาน ได้แก่ value type (เก็บข้อมูลโดยตรง) และ reference type (เก็บ reference/pointer ที่ชี้ไปยังข้อมูลบน heap) ทั้งสองต่างกันในวิธีการจัดเก็บ การคัดลอก และการเปรียบเทียบ ซึ่งเป็นความแตกต่างที่สำคัญและส่งผลต่อพฤติกรรมตลอดทั้งภาษา
สองประเภท
Value types → struct, int, double, bool, char, enum, DateTime, decimal
Stored INLINE (stack for locals); copied BY VALUE.
Reference types → class, string, array, object, interface, delegate
Variable holds a REFERENCE to data on the heap; copied BY REFERENCE.
