The Listing 7 output shows how nested type definitions are used within the parsed signatures.
清单7输出显示了嵌套类型定义在被解析的签名中的使用方法。
A nested type is a type that is a member of some other type.
嵌套类型是作为某其他类型的成员的类型。
Searches for the public nested type with the specified name.
搜索具有指定名称的公共嵌套类型。
A nested type is a type declared within the scope of another type.
嵌套类型是在另一个类型的范围中声明的类型。
If a nested type is generic, this method returns its generic type definition.
如果嵌套类型为泛型,则此方法返回其泛型类型定义。
The accessibility domain of a nested type never exceeds that of the containing type.
嵌套类型的可访问域决不能超出包含类型的可访问域。
If the purpose of the nesting is to categorize the nested type, use a namespace to create the hierarchy instead.
如果巢状结构的目的是将巢状型别进行分类,请改用命名空间建立阶层架构。
Because a nested type is treated as a member of the declaring type, the nested type has access to all other members in the declaring type.
由于嵌套类型被视为是声明类型的成员,因此嵌套类型可以访问声明类型中的所有其他成员。
Do use nested types when the relationship between the nested type and its outer type is such that member accessibility semantics are desirable.
如果嵌套类型和其外部类型之间的关系需要成员可访问性语义,则要使用嵌套类型。
Do use nested types when the relationship between the nested type and its outer type is such that member accessibility semantics are desirable.
如果嵌套类型和其外部类型之间的关系需要成员可访问性语义,则要使用嵌套类型。
应用推荐