Is string a value type or a reference type?
string is actually ref Type but some difference with other ref object Value type – bool, byte, chat, decimal, double, enum , float, int, long, sbyte, short,strut, uint, ulong, ushort Value types are stored in the Stack Reference type – class, delegate, interface, object, string Reference types are stored in the Heap
Related Questions
- Is there a reason why the Quantity and Value elements which seem to be numerical, include a data type element and a string value element, instead of an xsd:decimal or xsd:double?
- Okay, so an int is a value type, and a class is a reference type. How can int be derived from object?
- What is Reference type and value type ?