こんにちは、リアルタイムシナリオでインターフェイスを実装する方法は?インターフェイスを実装していないインターフェイスの実装
これが私の状況
である私は今、私はこのサービスを実装するクラスのPayPalを持っている2つの方法
void SaleTransaction();
void VoidTransaction();
を持つインタフェースIPayPalを行っています。
class PayPal:IPayPal{
public void SaleTransaction(){
// Implementation happens here
}
public void VoidTransaction(){
// Implementation happens here
}
}
今私は
class Service{
IPayPal pp=null;
static void Main(){
pp=new PayPal();
//Now i do not want to expose all the methods in my class PayPal
// is there any other way to just show pp.SaleOneTransaction() method?? i donot want the //PayPal class to be present in this Program..
//Please tell me how to acheive this.
}
}
すなわちを言うことができますペイパル
からサービスを要求するサービスを持っている私に、私は、そのクラスを明らかにすることなく、私のインターフェイスクラスを初期化することができる方法を教えてくださいインタフェースを実装します。
おかげ