O'Reilly logo

ASP.NET by Example by Steven A. Smith

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Types

Two kinds of types are supported in C#, value types and reference types. The difference between these two kinds of types is in the way the variables of each type behave.

Value Types

Unlike reference types, variables of value types contain the actual data they represent. Value types consist of predefined types, enums, and structs.

Predefined Types

Predefined types are shorthand for system types found in the .NET platform. Table D.3 outlines each of the value types found in C# as well as the system-provided type to which it corresponds.

Table D.3. Predefined Value Types in C#
Type Name Category Description
object System.Object The absolute base class of all other types
string System.String Unicode character sequence
sbyte System.SByte 8-bit ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required