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);
}
}
I couldnt understand how clscollectionadapter maps with the clscollection ? Is this a right example for class adapter pattern?
Can someone helps me to clarify this?