Avoid publicly exposed nested types.
避免公开显露嵌套类型。
Describes guidelines for designing nested types.
描述设计嵌套类型的准则。
Used for this purpose, nested types should not be externally visible.
如果用于此用途,则嵌套类型不应是外部可见的。
Do not use nested types if they need to be instantiated by client code.
如果需要由客户端代码实例化类型,则不要使用嵌套类型。
Type members include fields, methods, properties, constructors and nested types.
类型成员包括字段、方法、属性、构造函数和嵌套类型。
Do not use nested types if the type is likely to be referenced outside of the declaring type.
如果可能在声明类型的外部引用类型,则不要使用嵌套类型。
Declaration of variables and object instantiation for nested types should not be required in common scenarios.
在常见方案中,不应要求对嵌套类型进行变量声明和对象实例化。
The behavior and state of a type are defined by the members of the type: events, fields, nested types, methods, and properties.
类型的行为和状态是由类型的成员定义的,如事件、字段、嵌套类型、方法和属性。
Do use nested types when the relationship between the nested type and its outer type is such that member accessibility semantics are desirable.
如果嵌套类型和其外部类型之间的关系需要成员可访问性语义,则要使用嵌套类型。
The structure of SQL-like nested queries is examined. It is shown that any SQL- like nested query can be decomposed into four basic nested types.
本文分析了SQL类查询语句的基本结构,指出任何一个嵌套结构的SQL类语句都可以由四种基本嵌套类型组成。
Nested types in the same body can also access those private members.
同一体中的嵌套类型也可以访问那些私有成员。
Nested types can be partial, even if the type they are nested within is not partial itself.
嵌套类型可以是分部的,即使它们所嵌套于的类型本身并不是分部的也如此。
Nested types are often used to describe objects that are used only by the types that contain them.
通常用于描述仅由包含它们的类型所使用的对象。
Nested types include the notion of member accessibility, which some programmers do not understand clearly.
嵌套类型包含成员可访问性的概念,不是所有的程序员都清楚了解该概念。
Nested types are confusing to some developers and should not be publicly visible unless there is a compelling reason to do so.
有些开发人员会将嵌套类型弄混淆,因此嵌套类型不应是公开可见的,除非不得不这样做。
Nested types are confusing to some developers and should not be publicly visible unless there is a compelling reason to do so.
有些开发人员会将嵌套类型弄混淆,因此嵌套类型不应是公开可见的,除非不得不这样做。
应用推荐