Rohan  Rathore
What is difference between an reference type and value type in C#?
By Rohan Rathore in C# on Jun 13 2013
  • Krishna Mohan
    May, 2014 12

    We can make difference between the datatypes of c# Ref type and value type. To get basic difference between value and ref datatypes we have to see how this datatypes are getting memory allocation in RAM. Value datatype are always getting memory allocation in stack memory of Ram memory and its variable and value are present at same place. But in case of Ref data types the value is present in the heap memory of ram memory and having one random addresses location and the variable is present in stack memory which pointing towards the value addresses present in heap.So in Ref datatype the variable is referring to the address of the its value.In this way we can make difference in Ref and value.datatypes. For similar kind of c# interview questions you can refer this link also. c# interview questions

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS