Types and variables

There are two kinds of types in C#:

Variables of value types directly contain their data.

Variables of value types have their own copy of the data.

Variables of reference types store references to their data(objects).

Variables of reference types may reference the same object.

C#'s value types includes:

C#'s reference types are:

The following table lists the concrete types and their group names:

Signed integralsbyte, short, int, long
Unsigned integralbyte, ushort, uint, ulong
Unicode characterschar
IEEE floating pointfloat, double
High-precision decimaldecimal
Booleanbool
Enumenum EnumTypeName {...}
Structstruct StructTypeName {...}
Nullable value typenullable value
java2s.com  |  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.