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

Can a constructor have a return type?

872


What is the difference between system.string and system.text.stringbuilder classes?

1008


Is it possible to have different access modifiers on the get/set methods of a property?

1031


Can You Prevent Your Class From Being Inherited By Another Class?

947


Can list contain duplicates c#?

892


Which attribute adorn a test class to be picked up by the NUnit GUI in the NUnit test framework?

995


Is as keyword in c#?

882


How we convert private assembly into public assembly?

963


Explain how is the dll hell problem solved in .net?

863


Is learning c# hard?

922


How does insertion sort work?

924


What is the role of the datareader class in ado.net connections?

910


What is the purpose of namespace?

878


How to use reflection to call generic method?

914


How do you determine whether a string represents a numeric value?

931