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
Explain copy constructor?
How big is a float?
What are the Types of caching
How does aspect oriented programming work?
How to use exception handling in stored procedure?
When should I use static in C#?
How many constructors can a class have in c#?
Why do we use classes?
What is sorting in c#?
What is the difference between list and ilist in c#?
What is the use of oops in c#?
What is the default value of decimal in c#?
What is Delegate and what is it used for ?
How can we set the class to be inherited, but prevent the method from being over-ridden?
What is asp net c# corner?