1.5. Predefined Types
Generally speaking, C# is said to be a strongly typed programming language in that when a variable is declared, its type must also be declared. Among other things, declaring a variable's type tells the compiler how much memory to allocate for the variable.
The C# language and .NET Framework make use of the CTS, a specification that defines a set of types as well as the behavior of those types. The CTS defines a wide variety of types in two main families: value types and reference types. Both value types and reference types can also be declared to be generic types, which means that they can represent more than one type. In this chapter, we'll focus on C#'s predefined value types, also known as simple types, along with the ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access