This Tip shows how do you keep property as part of the interface, how do you implement that property on your class.
Consider the inteface below:
interface IBus
{
float DiscountPrice {get;}
}
Here, we specified that implementor of this interface, should implement the property DiscountPrice. Also, note that we asked for retrieval of the property value only needs to be implemented.
Below is the class that implements the above interface property:
public class SchoolBus:IBus
{
private int Price = 8000;
public float DiscountPrice
{
get { return price * 0.95f; }
}
}