如果嵌套类型和其外部类型之间的关系需要成员可访问性语义,则要使用嵌套类型。
Do use nested types when the relationship between the nested type and its outer type is such that member accessibility semantics are desirable.
如果继承类型(嵌套中的外部类型)必须从内部类型继承,请将内部类型移出外部类型。
If the inheriting type (the outer type in the nesting) must inherit from the inner type, move the inner type out of the outer type.
如果继承类型(嵌套中的外部类型)必须从内部类型继承,请将内部类型移出外部类型。
If the inheriting type (the outer type in the nesting) must inherit from the inner type, move the inner type out of the outer type.
应用推荐