Thursday, 7 July 2016

What are types: Value Type and Reference Type?

A. DataType specifies Type of the data as well as Size of the data. There are 2 type of DataTypes in C#:

a. Value Type: Value type holds data directly, Value type stored in the stack memory, we can get the direct value of the value types. Value type data type can’t be null.

b. Reference types: This type does not hold the data directly. They hold the address on which the actual data present. They stored in heap memory, Can have default values.

No comments:

Post a Comment