Types in C#: An Overview

Before we begin our discussion of the various types found in C#, we need to clarify what a type is and its significance in C#.

What Is a Type?

In our everyday language, the word type usually signifies a number of persons or items sharing one or more particular characteristics. This often causes a group of people of the same type to be regarded as a more or less precisely defined group.

In C#, all values belonging to a specific type can be said to share a set of predefined characteristics.

Important characteristics for a variable of a simple type are the values that can be represented, its internal memory requirements, and its predefined behavior when applied in various computations. For example, each variable of type ...

Get C# Primer Plus 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.