Junior — Middle
To which family do data types that store references to objects in memory belong?
sobes.tech AI
Answer from AI
Data types that store references to objects in memory belong to the family of reference types in C#. Unlike value types, which store data directly, reference types store the address of the object in managed heap.
Examples of reference types:
- Classes (class)
- Interfaces (interface)
- Delegates (delegate)
- Arrays (array)
Example:
class Person { public string Name; }
Person p = new Person(); // p is a reference to an object in memory