What is difference between value and reference types ?
Answer Posted / gowthami
value types are stored in the memory.
reference types are stored in the heap.
all implicit datatypes,enums,structs are value types.
delegates,objects are reference types..
pointer to the heap where the data is located is maintained
in the stack
when we delete a reference type pointer to the heap is
deleted from the stack
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
Explain the difference between “as” and “is” operators used in c#?
Why data types are important?
Explain how to implement delegates in c#.net
What is serialization of data?
What is default boolean value in c#?
What is clr namespace?
Explain the difference between “system.array.clone()” and “system.array.copyto()” in c#?
What is ienumerable <> in c#?
How to add a readonly property in c#.net
What is difference between an Structure and Class?
What is jagged array?
What is difference between private, protected, and public in C#?
What is interface c#?
Can arraylist store different data types in c#?
Define clr in .net?