I have the below code for class adapter pattern.
class clsCollection : CollectionBase
{
public virtual void Add(string str)
{
List.Add(str);
}
}
class clsStack : Stack
{
public void push(string str)
{
this.push(str);
}
}
class clsCollectionAdapter : clsStack
{
public void Add(string str)
{
this.push(str);
}
}
how this is connected to the class clscollection here? I couldnt understand how clscollectionadapter maps with the clscollection ?
Can someone helps me to clarify this?
Aucun commentaire:
Enregistrer un commentaire