Lecture overview -- Keyboard shortcut: 'u'  Previous page: Examples of immutable structs in C# -- Keyboard shortcut: 'p'  Next page: Nullable types -- Keyboard shortcut: 'n'  Lecture notes - all slides together  Annotated slide -- Keyboard shortcut: 't'  Textbook -- Keyboard shortcut: 'v'  Alphabetic index  Help page about these notes  Course home    Reference types, Value types, and Patterns - slide 15 : 29

Boxing and Unboxing
The use of boxing facilitates compatibility between value types and reference types

Boxing involves a wrapping of a value in an object of the class Object

Unboxing involves an unwrapping of a value from an object

boxing.cs
A program that illustrates boxing and unboxing.
output
Output of the boxing and unboxing program.