What is the Difference between value and reference type?
Answers were Sorted based on User's Feedback
Answer / nithya
value type variable :
If the valuetype variable data is copied to another
variable, its actual data is not effected.
eg., for valuetype variables are
char,boolean,structures,enumerations .
eg.
dim m.n as integer
m=100
n=200
reference type variable:
variable doesnt stores the actual data, instead it has a
pointer . that pointer will points to the actual data
location
eg., for reference type variabls are array,class .
eg.
dim a,b as integer
a=5
assume, a is in the memory locatyion of 1001.
that address value will be stored to the another variable
say b whose address is 1020
Is This Answer Correct ? | 6 Yes | 9 No |
What is string pool in c#?
Can you mark static constructor with access modifiers?
Can abstract class instantiated c#?
What is the difference between func and action delegate?
Which is faster hashtable or dictionary?
Define boxing and unboxing in c#?
Which of these statements correctly declares a two-dimensional array in c#?
Trace the O/p for a program on inheritance and Polymorphism. 3 classes A,B,C A with two methods public virtual SomeMethodA public virtual SomemoreMethodA B:A overide SomeMethodA C:B new Method SomeMethodA override SomeMoreMethodA main method { b new instance of B b.SomeMethodA b.SomeMoreMethodA b1 new instance of C b1.SomeMethodA b1.SomeMoreMethodA }
Why do we need interfaces?
What is written in c#?
what is a constructor?
5 Answers Amazon, Amdocs, Choice Solutions,
Why do we need abstract class?