泛型类型定义不可以从封闭构造的类型赋值。
A generic type definition is not assignable from a closed constructed type.
如果嵌套类型为泛型,则此方法返回其泛型类型定义。
If a nested type is generic, this method returns its generic type definition.
如果提供的类是泛型类,那么即使为这个类提供了最通用的参数类型定义,也会处理类的所有字段。
If that supplied class is a generic class, all fields of the class are processed as though the most general possible parameter type definitions were supplied for the class.
松散类型服务使用泛型参数定义,其中不以架构的形式包含消息内容的说明。
Loosely typed services use generic parameter definitions that do not include an explanation of the message content in form of a schema.
而且,即使采用泛型方式实现的服务也可以提供强类型接口定义。
And even a generically implemented service can provide a strongly typed interface definition.
注意,JRE5定义泛型的使用,指定集合的类型。
Notice that JRE 5 defines the use of generics, specifying the type of collection.
签名定义了泛型实际使用的参数类型,所以它提供了处理类型替换时需要的信息。
A signature defines the actual parameter types used with a generic type, so it provides the information I'll need to process type substitutions.
XAML 2009将完全支持泛型、非默认构造方法、工厂方法、内建类型并且可以定义新的属性。
In XAML 2009 we see full support for generics, non-default constructors, factory methods, built-in types, and defining new properties.
实际的类型参数可以由泛型类定义的类型变量匹配。
The actual type arguments can be matched to the type variables defined by the generified class.
但是如果ln是li的别名,那么这就破坏了蕴含在li定义中的类型安全承诺——它是一个整数列表,这就是泛型类型不能协变的原因。
But if ln were aliased with li, then it would break the type-safety promise implicit in the definition of li — that it is a list of integers, which is why generic types cannot be covariant.
依赖项注入方式的关键是,在查询数据时,要注入DAO将查询的实体的Class并定义泛型类型。
The key to the dependency-injection approach is that you query data by injecting the Class of the entity that the DAO will be querying, along with defining the generic type.
当然,程序员若只是为了能使用泛型类型而必须重新定义所有的标准实用程序类(比如Hashtable和List)的话,则可能会是一项浩大的工程。
Of course, it would be a significant amount of work for the programmer to have to redefine all of the standard utility classes — such as Hashtable and List — just to be able to use generic types.
创建泛型类型参数的定义,并获取该泛型类型参数的标记。
Each parameter definition consists of a parameter name and a data type.
在定义泛型类时,可以对客户端代码能够在实例化类时用于类型参数的类型种类施加限制。
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.
类似于泛型类的定义,但是在方法和构造中所定义的类型参数的作用域只能在定义它们的方法和构造中。
This is similar to declaring a generic type, but the type parameter's scope is limited to the method or constructor in which it's declared.
检查泛型或模板定义以找到正确的类型。
Check the generic or template definition to find the correct types.
泛型接口不要定义限制。接口层的限制通常能用强类型代替。
Do not define constraints in generic interfaces. Interface level-constraint can often be replaced by strong-typing.
如何:用反射发出定义泛型类型。
在由指定的泛型类型参数定义的上下文中,返回由指定的元数据标记标识的字段。
Returns the field identified by the specified metadata token, in the context defined by the specified generic type parameters.
我们建议在需要确保类型安全时定义泛型类。
We recommend that you define a generic class when you want to ensure type safety.
在泛型类中定义的委托,可以与类的方法一样地使用泛型类的类型参数。
Specialized generic types are created once for each unique value type used as a parameter.
泛型类型上定义的类型参数的名称是只读的。
The name of the type parameter that is defined on a generic type is read-only.
在由指定的泛型类型参数定义的上下文中,返回由指定的元数据标记标识的类型。
Returns the type identified by the specified metadata token, in the context defined by the specified generic type parameters.
在由指定的泛型类型参数定义的上下文中,返回由指定的元数据标记标识的类型。
Returns the type identified by the specified metadata token, in the context defined by the specified generic type parameters.
应用推荐