Value type :
- The data types which store the data directly into their memory location is known as value type.
- Memory is allocated at compile time.
- CLR doesn't provide automatic memory management.
- Value types are the fixed length like int,float,char etc...
- The data types which doesn't store the data directly into their memory location rather reference to other memory location where values are stored.
- Memory is allocate at run time.
- CLR provides automatic memory management.
- Reference types are the variable length like object and string.
Check out Difference Between Value Type and Reference Type in C#
ReplyDelete