Let say I have one method, now what is the difference in when I pass an interface as a parameter and a passing a class as a parameter?
Ex1.
public void GetPrice(IPartsData partsData)
{
Do something
}
Ex2.
public void GetPrice(PartsData partsData)
{
Do something.
}
Here in Ex1 I am pssing an interface and in Ex2 I am passing class in GetPrice method.