C# supports built-in mechanism for differentiating methods that have the same names. Here is a simple example below shows how it works:
interface IVehicle{
//identify vehicle by model, make, year
void IdentifySelf();
}
interface IRobot{
//identify robot by name
void IdentifySelf();
}
class TransformingRobot : IRobot, IVehicle{
void IRobot.IdentifySelf(){
Console.WriteLine("Robot");
}
void IVehicle.IdentifySelf(){
Console.WriteLine("Vehicle");
}
}
What are the use cases or benefits of this distinction? Do I really need to differentiate abstract methods in implementing classes?