I have a class called Person
class Person
{
public string name;
public int age;
public Person(string name, int age)
{
this.name = name;
this.age = age;
}
}
I created an object.
Person person = new Person("Sam", 20);
Now I want to print the address inside the person reference.
Now if anyone is thinking what I want to do with the address I just want to understand the concept of references.
By concept of references I mean
- Does a reference variable (here, person) contains address of the object.
- If it does contain the address than I want to know it's value.