
What
is the need for Adapter
|
class sampleClass1
{
public virtual void requestMethod() {
Console.WriteLine(Executing requestMethod of sampleClass1);
}
}
class adapterClass:sampleClass1 {
private sampleClass2 sample2Obj = new sampleClass2();
public override void requestMethod() {
sample2Obj.requestMethod1();
}
}
class sampleClass2 {
public void requestMethod1() {
Console.WriteLine(Executing requestMethod of sampleClass2);
}
}
_______________________________________________________________________
FREE Subscription
Subscribe
to our mailing list and receive new articles
through email. Keep yourself updated with latest
developments in the industry.
Note
: We never rent, trade, or sell my email lists to
anyone.
We assure that your privacy is respected
and protected.
Visit .NET Programming Tutorial Homepage
______________________________________________________