1. Value type
The data types which are capable of storing the data directly into their memory locations are known as “value type”.
Ex: int a=10; a=>10.
2.Refrence Type:
The data types which can’t store the data directly rather refer to other memory locations where data will be stored are known as “reference types”.
Ex:string s=”welcome”;
What is Difference b/w value type and Reference type?
Value type:
Store the data directly into their memory location
Memory is allocated at compile time
Memory allocated is made in stack i.e. continuously memory location

CLR doesn’t provide automatic memory management
Occupies less memory
If the data is initialized, then stores the default values into the variable
ex: int a; a=>0
Reference type:
Do not store the data type directly into their memory location. rather than refers to other memory location where data is stored
Memory is allocated at runtime
Memory allocations are made within the heap i.e. random memory allocations.

CLR provides automatic memory management
Occupies heap memory. A single reference type variable can occupy a maximum of up to 2GB of memory
If the data is not initialization then stores the null reference the variable
ex: string s; s=> null
- how to create ASP.NET Core 3 Web API Project - January 21, 2022
- JWT Authentication using OAUTH - January 10, 2022
- Ado.net database Transactions - January 9, 2022