Generic class is a pure dictionary that offers different performance characteristics , and which has no non generic counterpart .
泛型类是提供不同性能特点的纯字典,它没有对应的非泛型类。Constrain a type to be non generic by adding an explicit type annotation to a value or parameter.
通过将显式类型批注添加到值或参数,将类型约束为非泛型。This example shows the typical implementation, in which the non-generic method just forwards the call to the generic method.
此示例显示了典型的实现,其中,非泛型方法仅将调用转给泛型方法。Attributes can be applied to generic types in the same way as non-generic types.
特性可以应用于泛型类型中,方式与应用于非泛型类型相同。If the corresponding class, field, or method is not generic, a null value is passed when calling the method.
若相应的类、字段或方法非泛型,则在调用方法时将返回null值。Since generic classes can serve as base classes, the same design considerations apply here as with non-generic classes.
由于泛型类可以作为基类使用,此处适用的设计注意事项与非泛型类相同。The limitations of using non-generic collection classes can be demonstrated by writing a short program that makes use of the.
使用非泛型集合类的限制可以通过编写一小段程序来演示,该程序利用。Base class for a strongly typed non-generic read-only collection.
为强类型非泛型只读集合提供。Major refactoring internally to use generic collections instead of the non generic types.
在框架内部的重要重构使用了泛型集合类代替非泛型的集合性。