public class ReferenceType
{
public int FName { get; set; }
public int LName { get; set; }
}
ReferenceType rt1; //Line 6
rt1 = new ReferenceType(); //Line 7 >>have just split a single line statement<<
As everybody knows
how reference type works, in above code scenario
rt1
allocates a portion of memory in stack, to hold reference ofsome
object, in future (Line 6)rt1
is assigned reference of an object that is created on heap [a specific
]
Now, what really is this reference looks like internally, does rt1
holds an address of the (created) object, an hexadecimal, just like a pointer does in c++, or something else ?