Hi, I have a problem. I have a base class vehicle and some children classes like car, motorbike etc.. inheriting from vehicle. In each children class there is a function Go(); now I want to log information on every vehicle when the function go fires, and on that log I want to know witch kind of vehicle did it. example:
public class vehicle
{
public void Go()
{
Log("vehicle X fired");
}
}
public class car : vehicle
{
public void Go() : base()
{
// do something
}
}
How can I know in the function Log that car called me during the base()? Thanks,
Omri