The following code is from a Visual Studio 2008 C# Console application named CreateStruct. The code is from the Program.cs file. It illustrates what we have read until now, in a working application. The output of the Console application when run will be “John Mora (Male), age 32, 1234567890, Home”. If you ran this application and did not have read permissions on C:\boot.ini you would get an exception. The “[Serializable]” attribute allows the Manager class (which derives from the Person class) to be serialized, which will be covered later.
Common Language Runtime
Using Common Reference Types - continued

Strings and StringBuilders
One of the built in reference types within the .NET Framework you will commonly use is the System.String type. System.String has a set of members for manipulating text. For example here is a simple quick method for finding and replacing text:
Chapter 1: Lesson 2: Using Common Reference Types

Reference types store an address of their data, aka “pointer” on the portion of the memory called the “stack”. The actual data to which the pointer refers to is stored in an area of memory called the “heap”. Because reference types directly store the address “pointer” to the data rather than the data itself, assigning one reference variable to another doesn’t copy the data over. Instead, it merely creates a second copy of the “pointer”, which also refers to the same memory on the heap as the original.