C# Corner
Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
.NET
ADO.NET
Android
ASP.NET
C#
Databases & DBA
Design Patterns & Practices
iOS
Java
OOP/OOD
SharePoint
Software Testing
Web Development
WPF
View All
16
Reply
What is Value Type and Reference Type?
Ashraful Islam
9y
1.1k
0
Reply
Delete Row
Delete Column
Insert Link
×
Insert
Cancel
Embed YouTube Video
×
Width (%)
Height (%)
Insert
Cancel
Table Options
×
Rows
Columns
First row as header
Create Table
Insert Image
×
Selected file:
Alignment
Left
Center
Right
Select an image from your device to upload
Upload to Server
Cancel
Submit
Reference Type variables are stored in the heap while Value Type variables are stored in the stack.Value Type: A Value Type stores its contents in memory allocated on the stack. When you created aValue Type, a single space in memory is allocated to store the value and that variable directly holds avalue.
Rushikesh shahapurkar
8y
1
down vote value data type and reference data type1) value( contain the data directly ) but reference ( refers to the data )2) in value( every variable has its own copy) but in reference (more than variable can refer to some objects)3) in value (operation variable can`t effect on other variable ) but in reference (variable can affect other )4) value types are(int, bool, float) but reference type are (array , class objects , string )
Bharathi Raja
7y
0
In value type we the data size is fixed Like int,float,double In reference type data size is not fixed Like string, object
Mukesh Kumar
8y
0
Reference Type variables are stored in the heap while Value Type variables are stored in the stack.Value Type: A Value Type stores its contents in memory allocated on the stack. When you created aValue Type, a single space in memory is allocated to store the value and that variable directly holds avalue.
Rushikesh shahapurkar
8y
0
Reference Type variables are stored in the heap while Value Type variables are stored in the stack.Value Type: A Value Type stores its contents in memory allocated on the stack. When you created aValue Type, a single space in memory is allocated to store the value and that variable directly holds avalue.
Rushikesh shahapurkar
8y
0
Reference Type variables are stored in the heap while Value Type variables are stored in the stack.Value Type: A Value Type stores its contents in memory allocated on the stack. When you created aValue Type, a single space in memory is allocated to store the value and that variable directly holds avalue.
Rushikesh shahapurkar
8y
0
Reference Type variables are stored in the heap while Value Type variables are stored in the stack.Value Type: A Value Type stores its contents in memory allocated on the stack. When you created aValue Type, a single space in memory is allocated to store the value and that variable directly holds avalue.
Rushikesh shahapurkar
8y
0
value type stored in stack.and reference type stored in heap.
Dattatray Udamale
8y
0
value type stored in stack.and reference type stored in heap.
Dattatray Udamale
8y
0
value type stored in stack.and reference type stored in heap.
Dattatray Udamale
8y
0
value type stored in stack.and reference type stored in heap.
Dattatray Udamale
8y
0
value type stored in stack.and reference type stored in heap.
Dattatray Udamale
8y
0
value type stored in stack.and reference type stored in heap.
Dattatray Udamale
8y
0
A Value types holds the data in Stack, it is fixed length type, reference type holds the data in heap,heap is now more manage, its variable length..
Samatha Reddy
8y
0
A Value Type holds the data within its own memory allocation and a Reference Type contains a pointer to another memory location that holds the real data. Reference Type variables are stored in the heap while Value Type variables are stored in the stack. A Value Type stores its contents in memory allocated on the stack A Reference Type stores its contents in memory allocated on the heap
Ayappan Alagesan
8y
0
A Value Type holds the data within its own memory allocation and a Reference Type contains a pointer to another memory location that holds the real data. Reference Type variables are stored in the heap while Value Type variables are stored in the stack.
Ashraful Islam
9y
0
Message