What I mean by that is .. I have an interface, IGetData which defines a single method which returns a Customer object.
public interface IGetData
{
Customer GetData();
}
This interface is implemented by two different classes...SqlDataSource which gets the customer object from the SqlServer Database, while XmlDataSource gets the Customer object from the XmlDatasource.
The data class encapsulates the interface[IGetData]... in the Constructor of the Data class. you can pass in different implementations of IGetData. i.e you can pass any class which implements the IGetData interface.
By doing this .. you can have some factory method which will return the appropriate class which implements the IGetData interface.

PS: Click on the image to enlarge.
You can decouple more by using either factory or abstract factory pattern.
SourceCode download ---> http://dotnetdevblog.googlepages.com/StrategyPattern.zip
Happy Programming!!!
Yash

