What is difference between value and reference types ?
Answer Posted / narayansahu
value types are stored on stack whereas reference types are
stored on heap memory.
dim i as integer
or
int i
i here ia a value type and will be stored on stack.
Actually nearly all the basic types are implemented as a
structure.
where as
dim i as new Point()
(assuming point as a class)
i here is a referece variable(pointer) and will be stored
on stack where as The Point object will be created on heap
and i will point to it.
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Write a program to find the angle between the hours and minutes in a clock
What is ienumerator c#?
What is difference between method overriding and method overloading?
What is Inheritance in C#?
What is a concrete class in c#?
Can we instantiate abstract class in c#?
Explanation on Generic?
Does a class need a constructor c#?
How do you type a null character?
Explain polymorphism in c# with a simple example?
Explain briefly the difference between value type and reference type?
Are c# constructors the same as c++ constructors?
List some Advantages of switch-case over if else?
Define parsing?
What is a thread? What is multithreading?