Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Why do I get a syntax error when trying to declare a variable called checked?

999


What is event and delegates in c#?

985


What is .edmx file?

983


What is enumerable in c#?

883


Is int a class in c#?

970


How can I access the registry from c# code?

1008


What exactly is serverless?

832


What is session variable in c#?

1005


Is string nullable c#?

985


What is access specifier in c#?

1055


What is c# best for?

930


How can you set image source dynamically from c# application to ”test.png” file?

1070


You have got 1 million parking slots. At a time a parking slot can be free or not. To get next slot easily which data structure to implement?

1073


What is Covariance and contravariance in C#?

1053


Why do we need generics in c#?

923