What is the Difference between value and reference type?
Answer Posted / rita ghosal
REFERENCE TYPE=In contrast to value types, the value of a reference types is allocated on the heap. Another name for a reference type, that you might be more familiar with, is an object. Reference types stores the reference to the data, unlike value types, that stores the value. To demonstrate the difference between a reference type and a value type, let's look
VALUE TYPE=The value of value types are stored on the managed stack, and can be used directly. This means that the value is stored, and not a reference to the value. This also means that each value type has its own copy of the data. Reference Types on the other hand has a reference to the data, and several variables can reference the same data.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What are the different ways of method can be overloaded?
What is difference between the "throw" and "throw ex" in .net?
What is a type c#?
What are types in c#?
What is a partial class in c#?
Why do I get a syntax error when trying to declare a variable called checked?
What are the ways in which client can create object on server in cao model?
What is Private Constructor? and it’s use? Can you create instance of a class which has Private Constructor?
What are the different states of a thread?
How many dimensions can an array have?
What is the base class of all classes in c#?
What is serialization in .net?
How does one compare strings in c#?
How long will it take to learn c#?
There were a lot of questions asked, so I will list the topic (and add a what is "topic" and know pros/cons). Extreme programming, what is a transaction, various SDLC design approaches, what is a namespace, define a good test case, what is a stored proc, webservice? design patterns? linker? compiler? access modifiers? stack vs. queue? arrays vs. linked lists? sorting algorithms? recursion? OOP principles?