A data type is said to be of value type only if, it holds the data within its own memory allocation. A reference type contains a pointer to another memory location that holds the data. All the data types in .net classified in to value types and reference types.
1) The data types whose values are directly stored in stack memory area are called as value types.
2) Among all built in data types of .net string and object are reference type and all other data types are value types.
3) The value type consist of two main categories:
a) Structs b) Enumeration
4) Value types include the following:
a) All numeric data types: BOOLEAN, CHAR and DATE. b) All structures, even if their members are reference types. c) Enumeration, since their underlying type is always SByte, Short, Integer, Long, Byte, UShort, UInteger, or ULong.
Nipun TomarPosted Dec 17, 2013, 11:47 PM
A data type is said to be of value type only if, it holds the data within its own memory allocation. A reference type contains a pointer to another memory location that holds the data. All the data types in .net classified in to value types and reference types.
1) The data types whose values are directly stored in stack memory area are called as value types.
2) Among all built in data types of .net string and object are reference type and all other data types are value types.
3) The value type consist of two main categories:
a) Structs
b) Enumeration
4) Value types include the following:
a) All numeric data types: BOOLEAN, CHAR and DATE.
b) All structures, even if their members are reference types.
c) Enumeration, since their underlying type is always SByte, Short, Integer, Long, Byte, UShort, UInteger, or ULong.
Thanks