Look at this code.
public abstract class Customer
{
public abstract void Print();
}
class Program : Customer
{
public override void Print()
{
Console.WriteLine("Print Method");
}
}
When we implement an abstract method of abstract class we use override keyword as shown above.
Now look at this code.
public interface ICustomer
{
void Print();
}
class Program : ICustomer
{
public void Print()
{
Console.WriteLine("Print Method");
}
}
When we implement a method of an interface we don't use override keyword.Why?