我的方法func()的参数必须实现两个不相关的IFoo和IBar接口。有没有比这更好的方式来声明另一个接口,仅用于从IFoo和IBar继承并将该接口用作参数类型的目的? public interface IFooBar extends IFoo, IBar {
}
public function func(arg:IFooBar):void {
}
我开发什么,我试图做的Flash P
产生这种情况的场景非常复杂,所以我会去掉几块,并给出所涉及类的准确表示。 /* This is inherited using SI by many classes, as normal */
class IBase
{
virtual string toString()=0;
};
/* Base2 can't inherit IBase due to other methods o
可以说我有一个父类 class parent { }
.....
这位家长有三个子类 class child1 { }
class child2 { }
class child3 { }
这些子类有更小的部件,如 class child1subpar1 { }
class child1subpar2 {
public function foo() {
我有一个类TestService它实施两个服务合同,称为IService1和IService2。 但是我面临实施中的困难。 我的代码如下: Uri baseAddress = new Uri("http://localhost:8000/ServiceModel/Service");
Uri baseAddress1 = new Uri("http://localhost:8080/Servic