请注意下面的示例使用了最简略的方法:通功通用的客户端类(generic Client class)调用。愈加机动的圆式非创立一个旧的Request对于象,然先恳求主户端来处置它。
基于12个网页-相关网页
Each item that your connector returns to the client will be associated with an ItemClass, even if that class is just the generic, global class.
连接器返回给客户机的每个条目与一个ItemClass相关联,即使这个类只是一般性的全局类。
Also, client classes that instantiate our generic class must do so with classes that meet the declared constraint on what constructors exist.
同样,实例化泛型类的客户机类必须使用满足对构造函数存在所声明的约束的类来这样做。
When you define a generic class, you can apply restrictions to the kinds of types that client code can use for type arguments when it instantiates your class.
在定义泛型类时,可以对客户端代码能够在实例化类时用于类型参数的类型种类施加限制。
应用推荐