Very Simple Example of Interface for fresher public interface IVehicle
{
string GetName();
}
class Car : IVehicle
{
public string GetName()
{
return "Swift";
}
}
class Program
{
static void Main(string[] args)
{
Car myCar = new Car();
Console.WriteLine(myCar.GetName());
}
}
Similarly you have class of
Bikes, Jeep, Tractors etc.
Hope it will
help you all Thanks