Assume this type:
public class Car { }
And I create an instance of that:
Car myCar = new Car();
Target target = new Targe
There is no such thing as "name of the instance". What you're saying about is the name of the specific reference to the object; there could be many references to the same object, all with different names. Also, linking code and data (i.e. relying on the variable name) is a bad practice.
If you want Car
to have some name, then name it explicitly:
public class Car {
public string Name { get; set; }
}
Car myCar = new Car { Name = "myCar" };