What is the Difference between value and reference type?

Answer Posted / ravi

1. value type contain variable and reference type are not
containing value directly in its memory.
2.memory is allocated in managed heapin reference type and
in value type memory allocated in stack.
3.reference type ex-class
value type-struct, enumeration

Is This Answer Correct ?    36 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are cookies in c#?

748


What are the Types of assemblies that can be created in dotnet

875


Give an example of removing an element from the queue?

671


What is a collection in c#?

681


what is an exception in .net?

700


What is Named parameter in C#?

741


What is generic delegates in c#?

715


What is the difference between disposing of () and finalize() methods in c#?

731


Explain the types of errors in c#?

652


What is an enumerator in c#?

715


What is property c#?

693


What is difference between method overriding and method overloading?

727


What are PE(Portable Executable)?

719


can you allow a class to be inherited, but prevent the method from being over-ridden?

728


Is equal in c#?

672