I have two classes Inherited from ICart interface
When I create an object from this classes I want only Guest class show me IsInfoExist property. How am I gonna do that?
ICart cart = new Guest();
bool c = cart.IsInfoExist //it's ok
ICart cart = new Member();
cart.IsInfoExist not ok.
Actually I dont want never appear on intellinsense but Interface force me to show Member IsInfoExist property
class Guest:ICart
{
public bool IsInfoExist
{
get { return Session["guest_info"] != null; }
}
public void GetCart()
{
}
}
class Member:ICart
{
//Hide this on intellinsense always!
public bool IsInfoExist
{
get { return false; }
}
public void GetCart()
{
}
}
public interface ICart
{
void GetCart();
bool IsInfoExist { get; }
}