Home » Interview » Technology

Explain the difference between value types and reference types

Correct Answer: Value type : Stores the data The value of value types is stored on the managed stack They are lighter objects One variable can have only one value Reference Type : Stores the reference to the data A reference type is allocated on the heap They are heavier objects Several variables can reference the same data

← Previous Question Next Question→

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion