hi i am little bit confused in valu type or referance type…
for instance int is a value type string is referance type but int also referances some value
like int int i=4 here j is also referanced 4 as like i so why not we call it as a referance type……in case of
int j=istring s="hello" here s is referancing s…..will any one explain in storage point of view ……is there any restriction over valu type or referance type.
string s1=s
hi i am little bit confused in valu type or referance type… for instance
Share
intis value type, it means that this expressionj=icopies value from i to j.stringis reference type so here not value is copied but reference to that string, so they now point to same object.