What is difference between value and reference types?
Answer Posted / kartheeksirangipatel
ValueType:
-->Value types holds data directly.
-->Nodefault value for valuetype
-->valuetype stored in stack memory
-->Stack is not accessible to Garbage collector
Ex--->Predefined datatypes
Structures
Enumarator
Reference type:
-->Ref type does not holds the datadirectly
-->Ref type holds the default value
-->ref type will be stored in Heap memory
-->Heap is accessible to garbage collector
Ex--->Arryas
Classes
Objects
Deligates
Interfaces
| Is This Answer Correct ? | 2 Yes | 2 No |
Post New Answer View All Answers
What is the use of table aliases?
Explain about Threading Types.
What is a linq in c#?
What is reference c#?
Is object an int c#?
Are arrays immutable c#?
Is string nullable c#?
What is dataset and dataadapter in c#?
Which is faster abstract class or interface in c#?
What is difference between c sharp and c#?
What is parsing?
What is c# in asp net?
If I return out of a try/finally in c#, does the code in the finally-clause run?
What is a clr host?
What is thread.sleep()?