So,I have a class student and I created a reference variable pointing to the object of class student.I want to get the name of the reference variable in my code.I want o/p as Harry(which is my reference variable).Is this thing possible?
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
student harry = new student();
//OUTPUT:harry
}
}
public class student { }
}