C# types दोन मूलभूत श्रेणींमध्ये विभागले जातात: value types (डेटा थेट संचयित करतात) आणि reference types (heap वरील डेटाचा संदर्भ/pointer संचयित करतात). ते कसे संचयित केले जातात, कॉपी केले जातात आणि तुलना केली जातात यामध्ये भिन्न आहेत — हा एक महत्वाचा भेद जो संपूर्ण भाषेतील वर्तन प्रभावित करतो।
दोन श्रेणी
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.
