Value types include the numeric types (integers, floats, and so forth) and the Boolean type (bool). They also include user – defined types such as structs and enumerations. The following are the C# value types and a description of each type.
C# Type Description
bool Boolean
byte Unsigned integral
char Unsigned integral
decimal Signed numeric
double Signed numeric
enum Enumeration
float Signed numeric
int Signed integral
long Signed integral
sbyte Signed integral
short Signed integral
struct User – defined structure
uint Unsigned integral
ulong Unsigned integral
ushort Unsigned integral
Value types are stored on the stack, which is the region in memory used to store local variables and their data. All value types are implicitly derived from the Value Type class in the System namespace. Value types, how-ever, cannot be inherited.
Tuesday, March 16, 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment