Reference Types

Reference types are variables that store references to the data instead of holding the actual data. In other words, when a reference variable is instantiated with some data, it does not store the values. It only contains the storage location or a reference to the data.

The various reference data types, as shown in Figure 5.3, are objects, classes, interfaces, delegates, strings, and arrays.

Figure 5.3. Reference types are classified as Object, Class, Interface, Delegate, String, and Array types.

Objects

System.Object is the ultimate base class. All the data types supported by C# are derived from this class. This derivation ...

Get Special Edition Using C# now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.