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 will be the output of the following code?
What are the commonly used i/o classes?
What is the role of the datareader class in ado.net connections?
What is a method c#?
Difference between debug.write and trace.write?
Explain how to use an extender provider in the project.
How do I start a program in c#?
What is extended class in c#?
What are the steps for creating clr trigger
Define delay signing?
What is unmannaged code and will CLR handle this kind of code or not .
What does args mean in c#?
What's the implicit name of the parameter that gets passed into the set method/property of a class?
what is an event? Define delegate?
If casting fails what type of exception is thrown?