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
Is stringbuilder thread safe c#?
What is the root element of an xml file?
What is the difference between CONST and READONLY?
What is the use of console readkey ()?
What is the difference between class and namespace?
What does ienumerable mean?
What is the difference between readkey and readline in c#?
What is dataadapter c#?
What is difference between the "throw" and "throw ex" in .net?
How would you describe encapsulation in c#?
Can I fly with a loop recorder?
What is the task perform by clr?
what is the default access for a class
what are the differences between a class and structure
Is system a class in c#?